{"version":3,"file":"FooterCopyright.cjs","sources":["../../../src/components/Footer/FooterCopyright.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, type ComponentProps } from \"react\";\nimport { get } from \"../../helpers/get\";\nimport { resolveProps } from \"../../helpers/resolve-props\";\nimport { useResolveTheme } from \"../../helpers/resolve-theme\";\nimport { twMerge } from \"../../helpers/tailwind-merge\";\nimport { useThemeProvider } from \"../../theme/provider\";\nimport type { ThemingProps } from \"../../types\";\nimport { footerTheme } from \"./theme\";\n\nexport interface FooterCopyrightTheme {\n  base: string;\n  href: string;\n  span: string;\n}\n\nexport interface FooterCopyrightProps extends ComponentProps<\"div\">, ThemingProps<FooterCopyrightTheme> {\n  by: string;\n  href?: string;\n  year?: number;\n}\n\nexport const FooterCopyright = forwardRef<HTMLDivElement, FooterCopyrightProps>((props, ref) => {\n  const provider = useThemeProvider();\n  const theme = useResolveTheme(\n    [footerTheme.copyright, provider.theme?.footer?.copyright, props.theme],\n    [get(provider.clearTheme, \"footer.copyright\"), props.clearTheme],\n    [get(provider.applyTheme, \"footer.copyright\"), props.applyTheme],\n  );\n\n  const { by, className, href, year, ...restProps } = resolveProps(props, provider.props?.footerCopyright);\n\n  return (\n    <div ref={ref} data-testid=\"flowbite-footer-copyright\" className={twMerge(theme.base, className)} {...restProps}>\n      © {year}\n      {href ? (\n        <a href={href} className={theme.href}>\n          {by}\n        </a>\n      ) : (\n        <span data-testid=\"flowbite-footer-copyright-span\" className={theme.span}>\n          {by}\n        </span>\n      )}\n    </div>\n  );\n});\n\nFooterCopyright.displayName = \"FooterCopyright\";\n"],"names":["forwardRef","provider","useThemeProvider","theme","useResolveTheme","footerTheme","get","resolveProps","jsxs","twMerge","jsx"],"mappings":";;;;;;;;;;;AAUY,MAAC,eAAe,GAAGA,gBAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AAC1D,EAAE,MAAMC,UAAQ,GAAGC,yBAAgB,EAAE;AACrC,EAAE,MAAMC,OAAK,GAAGC,4BA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