import { c as _c } from "react/compiler-runtime";
import React, { createContext, type ReactNode, useContext } from 'react';
import { Box, Text } from '../../ink.js';
export const OrderedListItemContext = createContext({
  marker: ''
});
type OrderedListItemProps = {
  children: ReactNode;
};
export function OrderedListItem(t0) {
  const $ = _c(7);
  const {
    children
  } = t0;
  const {
    marker
  } = useContext(OrderedListItemContext);
  let t1;
  if ($[0] !== marker) {
    t1 = <Text dimColor={true}>{marker}</Text>;
    $[0] = marker;
    $[1] = t1;
  } else {
    t1 = $[1];
  }
  let t2;
  if ($[2] !== children) {
    t2 = <Box flexDirection="column">{children}</Box>;
    $[2] = children;
    $[3] = t2;
  } else {
    t2 = $[3];
  }
  let t3;
  if ($[4] !== t1 || $[5] !== t2) {
    t3 = <Box gap={1}>{t1}{t2}</Box>;
    $[4] = t1;
    $[5] = t2;
    $[6] = t3;
  } else {
    t3 = $[6];
  }
  return t3;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJSZWFjdCIsImNyZWF0ZUNvbnRleHQiLCJSZWFjdE5vZGUiLCJ1c2VDb250ZXh0IiwiQm94IiwiVGV4dCIsIk9yZGVyZWRMaXN0SXRlbUNvbnRleHQiLCJtYXJrZXIiLCJPcmRlcmVkTGlzdEl0ZW1Qcm9wcyIsImNoaWxkcmVuIiwiT3JkZXJlZExpc3RJdGVtIiwidDAiLCIkIiwiX2MiLCJ0MSIsInQyIiwidDMiXSwic291cmNlcyI6WyJPcmRlcmVkTGlzdEl0ZW0udHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBjcmVhdGVDb250ZXh0LCB0eXBlIFJlYWN0Tm9kZSwgdXNlQ29udGV4dCB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgQm94LCBUZXh0IH0gZnJvbSAnLi4vLi4vaW5rLmpzJ1xuXG5leHBvcnQgY29uc3QgT3JkZXJlZExpc3RJdGVtQ29udGV4dCA9IGNyZWF0Z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