// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use client";
"use strict";
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 _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;
}
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/drawer.tsx
var drawer_exports = {};
__export(drawer_exports, {
    Drawer: function() {
        return Drawer;
    },
    DrawerClose: function() {
        return DrawerClose;
    },
    DrawerContent: function() {
        return DrawerContent;
    },
    DrawerDescription: function() {
        return DrawerDescription;
    },
    DrawerFooter: function() {
        return DrawerFooter;
    },
    DrawerHeader: function() {
        return DrawerHeader;
    },
    DrawerOverlay: function() {
        return DrawerOverlay;
    },
    DrawerPortal: function() {
        return DrawerPortal;
    },
    DrawerTitle: function() {
        return DrawerTitle;
    },
    DrawerTrigger: function() {
        return DrawerTrigger;
    }
});
module.exports = __toCommonJS(drawer_exports);
var React = __toESM(require("react"));
var import_vaul = require("vaul");
// 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/drawer.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Drawer = function(_param) {
    var _param_shouldScaleBackground = _param.shouldScaleBackground, shouldScaleBackground = _param_shouldScaleBackground === void 0 ? true : _param_shouldScaleBackground, props = _object_without_properties(_param, [
        "shouldScaleBackground"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Root, _object_spread({
        shouldScaleBackground: shouldScaleBackground
    }, props));
};
Drawer.displayName = "Drawer";
var DrawerTrigger = import_vaul.Drawer.Trigger;
var DrawerPortal = import_vaul.Drawer.Portal;
var DrawerClose = import_vaul.Drawer.Close;
var DrawerOverlay = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Overlay, _object_spread({
        ref: ref,
        className: cn("fixed inset-0 z-50 bg-black/80", className)
    }, props));
});
DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
var DrawerContent = React.forwardRef(function(_param, ref) {
    var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
        "className",
        "children"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, {
        children: [
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
            /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_vaul.Drawer.Content, _object_spread_props(_object_spread({
                ref: ref,
                className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", className)
            }, props), {
                children: [
                    /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
                        className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"
                    }),
                    children
                ]
            }))
        ]
    });
});
DrawerContent.displayName = "DrawerContent";
var DrawerHeader = function(_param) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _object_spread({
        className: cn("grid gap-1.5 p-4 text-center sm:text-left", className)
    }, props));
};
DrawerHeader.displayName = "DrawerHeader";
var DrawerFooter = function(_param) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _object_spread({
        className: cn("mt-auto flex flex-col gap-2 p-4", className)
    }, props));
};
DrawerFooter.displayName = "DrawerFooter";
var DrawerTitle = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Title, _object_spread({
        ref: ref,
        className: cn("text-lg font-semibold leading-none tracking-tight", className)
    }, props));
});
DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
var DrawerDescription = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_vaul.Drawer.Description, _object_spread({
        ref: ref,
        className: cn("text-sm text-muted-foreground", className)
    }, props));
});
DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
    Drawer: Drawer,
    DrawerClose: DrawerClose,
    DrawerContent: DrawerContent,
    DrawerDescription: DrawerDescription,
    DrawerFooter: DrawerFooter,
    DrawerHeader: DrawerHeader,
    DrawerOverlay: DrawerOverlay,
    DrawerPortal: DrawerPortal,
    DrawerTitle: DrawerTitle,
    DrawerTrigger: DrawerTrigger
});
//# sourceMappingURL=drawer.js.map