"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { X } from "lucide-react";
import { Button } from "@open-mercato/ui/primitives/button";
import { IconButton } from "@open-mercato/ui/primitives/icon-button";
import { useT } from "@open-mercato/shared/lib/i18n/context";
import { translateWithFallback } from "@open-mercato/shared/lib/i18n/translate";
function FilterPopoverShell({
  title,
  leadingIcon,
  children,
  footerLeft,
  onClose,
  onCancel,
  onApply,
  applyLabel,
  bodyClassName
}) {
  const t = useT();
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col overflow-hidden rounded-2xl bg-card", children: [
    /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border bg-card px-5 py-4", children: [
      /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
        leadingIcon ? /* @__PURE__ */ jsx("span", { className: "flex size-4 items-center justify-center text-muted-foreground", "aria-hidden": "true", children: leadingIcon }) : null,
        /* @__PURE__ */ jsx("span", { className: "text-base font-bold leading-normal text-foreground", children: title })
      ] }),
      /* @__PURE__ */ jsx(
        IconButton,
        {
          type: "button",
          variant: "outline",
          size: "sm",
          onClick: onClose,
          "aria-label": translateWithFallback(t, "customers.deals.kanban.filter.close", "Close"),
          children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" })
        }
      )
    ] }),
    /* @__PURE__ */ jsx("div", { className: bodyClassName ?? "flex flex-col gap-4 bg-card px-5 py-4", children }),
    /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-border bg-muted px-5 py-3.5", children: [
      /* @__PURE__ */ jsx("div", { className: "text-xs leading-normal text-muted-foreground", children: footerLeft ?? null }),
      /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-6", children: [
        /* @__PURE__ */ jsx(
          Button,
          {
            variant: "outline",
            type: "button",
            onClick: onCancel,
            className: "h-auto rounded-lg border-input bg-card px-4 py-2 text-sm font-semibold text-foreground",
            children: translateWithFallback(t, "customers.deals.kanban.filter.cancel", "Cancel")
          }
        ),
        /* @__PURE__ */ jsx(
          Button,
          {
            type: "button",
            onClick: onApply,
            className: "h-auto rounded-lg bg-foreground px-5 py-2 text-sm font-semibold text-background hover:bg-foreground/90",
            children: applyLabel ?? translateWithFallback(t, "customers.deals.kanban.filter.apply", "Apply")
          }
        )
      ] })
    ] })
  ] });
}
var FilterPopoverShell_default = FilterPopoverShell;
export {
  FilterPopoverShell,
  FilterPopoverShell_default as default
};
//# sourceMappingURL=FilterPopoverShell.js.map
