import { cn } from "./index3.js";
import { Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, BreadcrumbList as BreadcrumbList$1, BreadcrumbPage as BreadcrumbPage$1, BreadcrumbSeparator as BreadcrumbSeparator$1 } from "./index400.js";
import { cva } from "class-variance-authority";
import { ChevronRight, Home, Slash } from "lucide-react";
import * as React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/components/molecules/navigation/Breadcrumb/Breadcrumb.tsx
/** biome-ignore-all lint/a11y/useFocusableInteractive: BreadcrumbPage intentionally uses aria-disabled="true" for current page, removing it from tab order */
/** biome-ignore-all lint/a11y/useSemanticElements: BreadcrumbPage uses span with role="link" for non-interactive current page indicator per WAI-ARIA breadcrumb pattern */
var FOCUS_RING = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm";
var breadcrumbItemVariants = cva("inline-flex items-center transition-[color,opacity,background-color,border-color,text-decoration-color] duration-200 ease-out whitespace-nowrap relative before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:min-h-11 before:content-[\"\"] sm:before:content-none motion-reduce:transition-none", {
	variants: {
		variant: {
			text: "text-sm font-normal text-muted-foreground hover:text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current/30",
			"soft-badge": "text-xs font-normal text-primary rounded-full px-2 py-0.5 bg-primary/10 hover:bg-primary/15",
			"outline-badge": "text-xs font-normal text-foreground rounded-full px-2 py-0.5 border border-muted-foreground/50 hover:border-muted-foreground"
		},
		isCurrent: {
			true: "",
			false: ""
		}
	},
	compoundVariants: [
		{
			variant: "text",
			isCurrent: true,
			className: "text-foreground no-underline"
		},
		{
			variant: "text",
			isCurrent: false,
			className: "text-muted-foreground"
		},
		{
			variant: "soft-badge",
			isCurrent: true,
			className: "bg-primary/10"
		},
		{
			variant: "soft-badge",
			isCurrent: false,
			className: "bg-primary/10 opacity-50"
		},
		{
			variant: "outline-badge",
			isCurrent: true,
			className: "border-primary text-foreground"
		},
		{
			variant: "outline-badge",
			isCurrent: false,
			className: "border-muted-foreground/50 opacity-50"
		}
	],
	defaultVariants: {
		variant: "text",
		isCurrent: false
	}
});
var BreadcrumbContext = React.createContext({ separator: "chevron" });
var useBreadcrumbContext = () => React.useContext(BreadcrumbContext);
function Breadcrumb({ className, separator = "chevron", ring = false, children, ...props }) {
	const contextValue = React.useMemo(() => ({ separator }), [separator]);
	return /* @__PURE__ */ jsx(BreadcrumbContext.Provider, {
		value: contextValue,
		children: /* @__PURE__ */ jsx(Breadcrumb$1, {
			className: cn(ring && "inline-flex border border-ring/50 rounded-full px-2.5 py-0.5", className),
			...props,
			children
		})
	});
}
function BreadcrumbList({ className, ...props }) {
	return /* @__PURE__ */ jsx(BreadcrumbList$1, {
		className: cn("flex-nowrap gap-1", className),
		...props
	});
}
function BreadcrumbItem({ className, ...props }) {
	return /* @__PURE__ */ jsx(BreadcrumbItem$1, {
		className: cn("gap-1", className),
		...props
	});
}
function BreadcrumbLink({ className, variant = "text", isCurrent = false, ...props }) {
	return /* @__PURE__ */ jsx(BreadcrumbLink$1, {
		className: cn(breadcrumbItemVariants({
			variant,
			isCurrent
		}), className),
		...props
	});
}
function BreadcrumbPage({ className, variant = "text", ...props }) {
	return /* @__PURE__ */ jsx(BreadcrumbPage$1, {
		className: cn(breadcrumbItemVariants({
			variant,
			isCurrent: true
		}), className),
		...props
	});
}
function BreadcrumbSeparator({ className, type, ...props }) {
	const { separator } = useBreadcrumbContext();
	const separatorType = type ?? separator;
	return /* @__PURE__ */ jsx(BreadcrumbSeparator$1, {
		className: cn("[&>svg]:size-3.5 text-quaternary-foreground transition-opacity duration-200 ease-out motion-reduce:transition-none", className),
		...props,
		children: separatorType === "slash" ? /* @__PURE__ */ jsx(Slash, {}) : /* @__PURE__ */ jsx(ChevronRight, { className: "rtl:rotate-180" })
	});
}
function BreadcrumbEllipsis({ className, variant = "text", ...props }) {
	return /* @__PURE__ */ jsx("button", {
		type: "button",
		"data-slot": "breadcrumb-ellipsis",
		"aria-label": "Show more breadcrumb items",
		className: cn(breadcrumbItemVariants({
			variant,
			isCurrent: false
		}), `cursor-pointer hover:text-foreground ${FOCUS_RING}`, className),
		...props,
		children: "…"
	});
}
function BreadcrumbHomeLink({ className, variant = "text", srLabel = "Home", ...props }) {
	return /* @__PURE__ */ jsxs(BreadcrumbLink$1, {
		className: cn(`group inline-flex items-center text-quaternary-foreground hover:text-secondary-foreground transition-colors duration-200 ease-out motion-reduce:transition-none ${FOCUS_RING}`, variant === "soft-badge" && "rounded-full px-1.5 py-0.5 bg-primary/10 text-primary", variant === "outline-badge" && "rounded-full px-1.5 py-0.5 border border-muted-foreground/50", className),
		...props,
		children: [/* @__PURE__ */ jsx(Home, { className: "size-3.5 transition-transform duration-200 ease-out group-hover:scale-110 motion-reduce:transition-none" }), /* @__PURE__ */ jsx("span", {
			className: "sr-only",
			children: srLabel
		})]
	});
}
Breadcrumb.displayName = "Breadcrumb";
BreadcrumbList.displayName = "BreadcrumbList";
BreadcrumbItem.displayName = "BreadcrumbItem";
BreadcrumbLink.displayName = "BreadcrumbLink";
BreadcrumbPage.displayName = "BreadcrumbPage";
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
BreadcrumbHomeLink.displayName = "BreadcrumbHomeLink";
/**
* Breadcrumb component with dot notation for compound parts.
*
* @example
* ```tsx
* <Breadcrumb>
*   <Breadcrumb.List>
*     <Breadcrumb.Item>
*       <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
*     </Breadcrumb.Item>
*     <Breadcrumb.Separator />
*     <Breadcrumb.Item>
*       <Breadcrumb.Page>Current</Breadcrumb.Page>
*     </Breadcrumb.Item>
*   </Breadcrumb.List>
* </Breadcrumb>
* ```
*/
var BreadcrumbCompound = Object.assign(Breadcrumb, {
	Root: Breadcrumb,
	List: BreadcrumbList,
	Item: BreadcrumbItem,
	Link: BreadcrumbLink,
	Page: BreadcrumbPage,
	Separator: BreadcrumbSeparator,
	Ellipsis: BreadcrumbEllipsis,
	HomeLink: BreadcrumbHomeLink
});
//#endregion
export { BreadcrumbCompound, BreadcrumbEllipsis, BreadcrumbHomeLink, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, breadcrumbItemVariants };

//# sourceMappingURL=index401.js.map