{"version":3,"file":"TimelinePoint.cjs","sources":["../../../../src/components/Timeline/TimelinePoint.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps, FC } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { mergeDeep } from \"../../helpers/merge-deep\";\nimport type { DeepPartial } from \"../../types\";\nimport { useTimelineContext } from \"./TimelineContext\";\nimport { useTimelineItemContext } from \"./TimelineItemContext\";\n\nexport interface FlowbiteTimelinePointTheme {\n  horizontal: string;\n  line: string;\n  marker: {\n    base: {\n      horizontal: string;\n      vertical: string;\n    };\n    icon: {\n      base: string;\n      wrapper: string;\n    };\n  };\n  vertical: string;\n}\n\nexport interface TimelnePointProps extends ComponentProps<\"div\"> {\n  icon?: FC<ComponentProps<\"svg\">>;\n  theme?: DeepPartial<FlowbiteTimelinePointTheme>;\n}\n\nexport const TimelinePoint: FC<TimelnePointProps> = ({\n  children,\n  className,\n  icon: Icon,\n  theme: customTheme = {},\n  ...props\n}) => {\n  const { horizontal } = useTimelineContext();\n  const { theme: itemTheme } = useTimelineItemContext();\n\n  const theme = mergeDeep(itemTheme.point, customTheme);\n\n  return (\n    <div\n      data-testid=\"timeline-point\"\n      className={twMerge(horizontal && theme.horizontal, !horizontal && theme.vertical, className)}\n      {...props}\n    >\n      {children}\n      {Icon ? (\n        <span className={twMerge(theme.marker.icon.wrapper)}>\n          <Icon aria-hidden className={twMerge(theme.marker.icon.base)} />\n        </span>\n      ) : (\n        <div\n          className={twMerge(horizontal && theme.marker.base.horizontal, !horizontal && theme.marker.base.vertical)}\n        />\n      )}\n      {horizontal && <div className={twMerge(theme.line)} />}\n    </div>\n  );\n};\n"],"names":["useTimelineContext","useTimelineItemContext","mergeDeep","jsxs","twMerge","jsx"],"mappings":";;;;;;;;AAOY,MAAC,aAAa,GAAG,CAAC;AAC9B,EAAE,QAAQ;AACV,EAAE,SAAS;AACX,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE;AACz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