"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntityCardActionItem = void 0;
exports.EntityCardGrid = EntityCardGrid;
exports.EntityCardGridFooter = EntityCardGridFooter;
exports.EntityCard = EntityCard;
exports.EntityCardAction = EntityCardAction;
exports.EntityCardHeader = EntityCardHeader;
exports.EntityCardTitle = EntityCardTitle;
exports.EntityCardIcon = EntityCardIcon;
exports.EntityCardBadgeList = EntityCardBadgeList;
exports.EntityCardBadge = EntityCardBadge;
exports.EntityCardContent = EntityCardContent;
exports.EntityCardDescription = EntityCardDescription;
exports.EntityCardList = EntityCardList;
exports.EntityCardFooter = EntityCardFooter;
const jsx_runtime_1 = require("react/jsx-runtime");
const badge_1 = require("../../../components/ui/badge");
const dropdown_menu_1 = require("../../../components/ui/dropdown-menu");
const icon_button_1 = require("../../../components/ui/icon-button");
const progress_1 = require("../../../components/ui/progress");
const separator_1 = require("../../../components/ui/separator");
const utils_1 = require("../../../lib/utils");
const lucide_react_1 = require("lucide-react");
function EntityCardGrid({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3', className), "data-slot": "entity-card-grid", ...props }));
}
function EntityCardGridFooter({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('flex items-center justify-between rounded-lg border border-zinc-200 bg-white px-6 py-4', className), "data-slot": "entity-card-grid-footer", ...props }));
}
function EntityCard({ className, value, progress = false, children, ...props }) {
    return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-wrapper", className: "transition-shadow hover:shadow-xl", children: [(0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card", className: (0, utils_1.cn)('bg-card relative flex flex-col gap-4 rounded-lg px-5 py-4', { 'rounded-b-none': progress }, className), ...props, children: children }), progress && (0, jsx_runtime_1.jsx)(progress_1.Progress, { className: "h-1.5 rounded-t-none", value: value })] }));
}
function EntityCardAction({ children, ...props }) {
    return ((0, jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenu, { ...props, children: [(0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuTrigger, { className: "absolute top-2.5 right-2.5", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "outline", size: "small", rounded: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, {}) }) }), (0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuContent, { children: children })] }));
}
exports.EntityCardActionItem = dropdown_menu_1.DropdownMenuItem;
function EntityCardHeader({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-header", className: (0, utils_1.cn)('flex flex-col gap-2', className), ...props }));
}
function EntityCardTitle({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("h3", { "data-slot": "entity-card-title", className: (0, utils_1.cn)('text-foreground text-sm font-semibold', className), ...props }));
}
function EntityCardIcon({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "entity-card-icon", className: (0, utils_1.cn)('text-shadcn-400 size-8 [&>svg]:size-8 [&>svg]:stroke-[1.5]', className), ...props }));
}
function EntityCardBadgeList({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-badge-list", className: (0, utils_1.cn)('flex flex-wrap gap-2', className), ...props }));
}
function EntityCardBadge({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { "data-slot": "entity-card-badge", className: (0, utils_1.cn)('h-5 text-xs', className), ...props }));
}
function EntityCardContent({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-content", className: (0, utils_1.cn)('flex flex-col gap-2.5', className), ...props }));
}
function EntityCardDescription({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "entity-card-description", className: (0, utils_1.cn)('text-shadcn-400 text-xs font-medium', className), ...props }));
}
function EntityCardList({ className, ...props }) {
    return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "entity-card-list", className: (0, utils_1.cn)('text-shadcn-500 mx-2 list-inside list-disc space-y-1 text-xs font-medium', className), ...props }));
}
function EntityCardFooter({ className, children, ...props }) {
    return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-footer", className: (0, utils_1.cn)('text-shadcn-400 flex flex-col gap-2 text-xs font-medium', className), ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, {}), (0, jsx_runtime_1.jsx)("div", { className: "[&>svg]:text-muted-foreground flex flex-row items-center gap-2 [&>svg]:size-4 [&>svg]:stroke-[1.5]", children: children })] }));
}
