// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use strict";
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_without_holes(arr) {
    if (Array.isArray(arr)) return _array_like_to_array(arr);
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _extends() {
    _extends = Object.assign || function(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends.apply(this, arguments);
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _non_iterable_spread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _object_destructuring_empty(o) {
    if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
    return o;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = _object_without_properties_loose(source, excluded);
    var key, i;
    if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceSymbolKeys.length; i++){
            key = sourceSymbolKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
    }
    return target;
}
function _to_consumable_array(arr) {
    return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function(target, all) {
    for(var name in all)__defProp(target, name, {
        get: all[name],
        enumerable: true
    });
};
var __copyProps = function(to, from, except, desc) {
    if (from && typeof from === "object" || typeof from === "function") {
        var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
        try {
            var _loop = function() {
                var key = _step.value;
                if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
                    get: function() {
                        return from[key];
                    },
                    enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
                });
            };
            for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
        } catch (err) {
            _didIteratorError = true;
            _iteratorError = err;
        } finally{
            try {
                if (!_iteratorNormalCompletion && _iterator.return != null) {
                    _iterator.return();
                }
            } finally{
                if (_didIteratorError) {
                    throw _iteratorError;
                }
            }
        }
    }
    return to;
};
var __toESM = function(mod, isNodeMode, target) {
    return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
        value: mod,
        enumerable: true
    }) : target, mod);
};
var __toCommonJS = function(mod) {
    return __copyProps(__defProp({}, "__esModule", {
        value: true
    }), mod);
};
// registry/default/ui/breadcrumb.tsx
var breadcrumb_exports = {};
__export(breadcrumb_exports, {
    Breadcrumb: function() {
        return Breadcrumb;
    },
    BreadcrumbEllipsis: function() {
        return BreadcrumbEllipsis;
    },
    BreadcrumbItem: function() {
        return BreadcrumbItem;
    },
    BreadcrumbLink: function() {
        return BreadcrumbLink;
    },
    BreadcrumbList: function() {
        return BreadcrumbList;
    },
    BreadcrumbPage: function() {
        return BreadcrumbPage;
    },
    BreadcrumbSeparator: function() {
        return BreadcrumbSeparator;
    }
});
module.exports = __toCommonJS(breadcrumb_exports);
var React = __toESM(require("react"));
// ../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends1() {
    _extends1 = Object.assign ? Object.assign.bind() : function _extends(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends1.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
var import_react2 = require("react");
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var import_react = require("react");
function $6ed0406888f73fc4$var$setRef(ref, value) {
    if (typeof ref === "function") ref(value);
    else if (ref !== null && ref !== void 0) ref.current = value;
}
function $6ed0406888f73fc4$export$43e446d32b3d21af() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return function(node) {
        return refs.forEach(function(ref) {
            return $6ed0406888f73fc4$var$setRef(ref, node);
        });
    };
}
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    var childrenArray = import_react2.Children.toArray(children);
    var slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
    if (slottable) {
        var newElement = slottable.props.children;
        var newChildren = childrenArray.map(function(child) {
            if (child === slottable) {
                if (import_react2.Children.count(newElement) > 1) return import_react2.Children.only(null);
                return /* @__PURE__ */ (0, import_react2.isValidElement)(newElement) ? newElement.props.children : null;
            } else return child;
        });
        return /* @__PURE__ */ (0, import_react2.createElement)($5e63c961fc1ce211$var$SlotClone, _extends1({}, slotProps, {
            ref: forwardedRef
        }), /* @__PURE__ */ (0, import_react2.isValidElement)(newElement) ? /* @__PURE__ */ (0, import_react2.cloneElement)(newElement, void 0, newChildren) : null);
    }
    return /* @__PURE__ */ (0, import_react2.createElement)($5e63c961fc1ce211$var$SlotClone, _extends1({}, slotProps, {
        ref: forwardedRef
    }), children);
});
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    if (/* @__PURE__ */ (0, import_react2.isValidElement)(children)) return /* @__PURE__ */ (0, import_react2.cloneElement)(children, _object_spread_props(_object_spread({}, $5e63c961fc1ce211$var$mergeProps(slotProps, children.props)), {
        ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
    }));
    return import_react2.Children.count(children) > 1 ? import_react2.Children.only(null) : null;
});
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = function(param) {
    var children = param.children;
    return /* @__PURE__ */ (0, import_react2.createElement)(import_react2.Fragment, null, children);
};
function $5e63c961fc1ce211$var$isSlottable(child) {
    return /* @__PURE__ */ (0, import_react2.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
}
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
    var _loop = function(propName) {
        var slotPropValue = slotProps[propName];
        var childPropValue = childProps[propName];
        var isHandler = /^on[A-Z]/.test(propName);
        if (isHandler) {
            if (slotPropValue && childPropValue) overrideProps[propName] = function() {
                for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                    args[_key] = arguments[_key];
                }
                childPropValue.apply(void 0, _to_consumable_array(args));
                slotPropValue.apply(void 0, _to_consumable_array(args));
            };
            else if (slotPropValue) overrideProps[propName] = slotPropValue;
        } else if (propName === "style") overrideProps[propName] = _object_spread({}, slotPropValue, childPropValue);
        else if (propName === "className") overrideProps[propName] = [
            slotPropValue,
            childPropValue
        ].filter(Boolean).join(" ");
    };
    var overrideProps = _object_spread({}, childProps);
    for(var propName in childProps)_loop(propName);
    return _object_spread({}, slotProps, overrideProps);
}
// registry/default/ui/breadcrumb.tsx
var import_lucide_react = require("lucide-react");
// lib/utils.ts
var import_clsx = require("clsx");
var import_tailwind_merge = require("tailwind-merge");
function cn() {
    for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
        inputs[_key] = arguments[_key];
    }
    return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
}
// registry/default/ui/breadcrumb.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Breadcrumb = React.forwardRef(function(_param, ref) {
    var props = _extends({}, _object_destructuring_empty(_param));
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", _object_spread({
        ref: ref,
        "aria-label": "breadcrumb"
    }, props));
});
Breadcrumb.displayName = "Breadcrumb";
var BreadcrumbList = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", _object_spread({
        ref: ref,
        className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className)
    }, props));
});
BreadcrumbList.displayName = "BreadcrumbList";
var BreadcrumbItem = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", _object_spread({
        ref: ref,
        className: cn("inline-flex items-center gap-1.5", className)
    }, props));
});
BreadcrumbItem.displayName = "BreadcrumbItem";
var BreadcrumbLink = React.forwardRef(function(_param, ref) {
    var asChild = _param.asChild, className = _param.className, props = _object_without_properties(_param, [
        "asChild",
        "className"
    ]);
    var Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "a";
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, _object_spread({
        ref: ref,
        className: cn("transition-colors hover:text-foreground", className)
    }, props));
});
BreadcrumbLink.displayName = "BreadcrumbLink";
var BreadcrumbPage = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", _object_spread({
        ref: ref,
        role: "link",
        "aria-disabled": "true",
        "aria-current": "page",
        className: cn("font-normal text-foreground", className)
    }, props));
});
BreadcrumbPage.displayName = "BreadcrumbPage";
var BreadcrumbSeparator = function(_param) {
    var children = _param.children, className = _param.className, props = _object_without_properties(_param, [
        "children",
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", _object_spread_props(_object_spread({
        role: "presentation",
        "aria-hidden": "true",
        className: cn("[&>svg]:size-3.5", className)
    }, props), {
        children: children !== null && children !== void 0 ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRight, {})
    }));
};
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
var BreadcrumbEllipsis = function(_param) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", _object_spread_props(_object_spread({
        role: "presentation",
        "aria-hidden": "true",
        className: cn("flex h-9 w-9 items-center justify-center", className)
    }, props), {
        children: [
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MoreHorizontal, {
                className: "h-4 w-4"
            }),
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
                className: "sr-only",
                children: "More"
            })
        ]
    }));
};
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
    Breadcrumb: Breadcrumb,
    BreadcrumbEllipsis: BreadcrumbEllipsis,
    BreadcrumbItem: BreadcrumbItem,
    BreadcrumbLink: BreadcrumbLink,
    BreadcrumbList: BreadcrumbList,
    BreadcrumbPage: BreadcrumbPage,
    BreadcrumbSeparator: BreadcrumbSeparator
});
//# sourceMappingURL=breadcrumb.js.map