'use client';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SidebarItemButton = SidebarItemButton;
const jsx_runtime_1 = require("react/jsx-runtime");
const link_1 = __importDefault(require("next/link"));
const button_1 = require("../../ui/button");
const utils_1 = require("../../../lib/utils");
function SidebarItemButton({ className, title, icon, href, active, inactive, disabled = false, ...props }) {
    const sharedClassName = (0, utils_1.cn)((0, button_1.buttonVariants)({
        variant: active ? 'tertiary' : 'outline',
        fullWidth: true,
        size: 'small'
    }), 'group/link flex items-center justify-start', inactive && 'hover:border-transparent', disabled && 'cursor-default opacity-30', className);
    const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)((0, button_1.iconVariants)({ position: 'start', size: 'small' })), children: icon })), title] }));
    if (disabled || inactive) {
        return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-item-button", className: sharedClassName, children: content }));
    }
    return ((0, jsx_runtime_1.jsx)(link_1.default, { "data-slot": "sidebar-item-button", href: href, className: sharedClassName, ...props, children: content }));
}
