"use client";
'use strict';

var tabs = require('@base-ui/react/tabs');
var classVarianceAuthority = require('class-variance-authority');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var jsxRuntime = require('react/jsx-runtime');

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
var pillIndicatorClassName = cn(
  "pointer-events-none absolute z-0 rounded-[var(--radius-sm)] border border-primary bg-primary/12",
  "dark:bg-primary/22",
  "left-[var(--active-tab-left)] top-[var(--active-tab-top)] w-[var(--active-tab-width)] h-[var(--active-tab-height)]",
  "transition-all duration-[180ms] ease-[cubic-bezier(0.65,0,0.35,1)]",
  "motion-reduce:transition-none"
);
function Tabs(_a) {
  var _b = _a, {
    className,
    orientation = "horizontal"
  } = _b, props = __objRest(_b, [
    "className",
    "orientation"
  ]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    tabs.Tabs.Root,
    __spreadValues({
      "data-slot": "tabs",
      "data-orientation": orientation,
      className: cn(
        "group/tabs flex gap-2 data-horizontal:flex-col",
        className
      )
    }, props)
  );
}
var tabsListVariants = classVarianceAuthority.cva(
  "group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",
  {
    variants: {
      variant: {
        default: "rounded-sm p-[3px] bg-muted",
        line: "gap-1 rounded-none bg-transparent",
        /** Shift 2.0 Sort UI: pill/segment tabs, 8px gap, no list background */
        pill: "gap-2 rounded-none bg-transparent p-0",
        /** Bordered flat filter tabs — full-width row, left-aligned, wrapping. Matches campaigns list deck tabs. */
        filter: "h-auto min-h-8 w-full flex-wrap justify-start gap-2 rounded-none bg-transparent p-0 group-data-horizontal/tabs:h-auto",
        /** Full-width underline tabs: thin baseline track, thick active segment (e.g. vehicle detail deck). */
        bleedLine: "flex w-full max-w-none items-stretch justify-stretch gap-0 rounded-none border-b border-border bg-transparent p-0 group-data-horizontal/tabs:h-auto"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function TabsList(_a) {
  var _b = _a, {
    className,
    variant = "default",
    children
  } = _b, rest = __objRest(_b, [
    "className",
    "variant",
    "children"
  ]);
  return /* @__PURE__ */ jsxRuntime.jsxs(
    tabs.Tabs.List,
    __spreadProps(__spreadValues({
      "data-slot": "tabs-list",
      "data-variant": variant,
      className: cn(
        tabsListVariants({ variant }),
        variant === "pill" && "relative",
        className
      )
    }, rest), {
      children: [
        variant === "pill" && /* @__PURE__ */ jsxRuntime.jsx(
          tabs.Tabs.Indicator,
          {
            className: pillIndicatorClassName,
            renderBeforeHydration: true
          }
        ),
        children
      ]
    })
  );
}
function TabsTrigger(_a) {
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    tabs.Tabs.Tab,
    __spreadValues({
      "data-slot": "tabs-trigger",
      className: cn(
        "relative inline-flex flex-1 cursor-pointer items-center justify-center gap-1.5 border-0 text-sm font-medium whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:outline-none focus-visible:ring-0 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        "group-data-[variant=default]/tabs-list:h-[calc(100%-1px)] group-data-[variant=default]/tabs-list:rounded-xs group-data-[variant=default]/tabs-list:px-1.5 group-data-[variant=default]/tabs-list:py-0.5 group-data-[variant=default]/tabs-list:text-foreground/60 group-data-[variant=default]/tabs-list:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm dark:group-data-[variant=default]/tabs-list:text-muted-foreground dark:group-data-[variant=default]/tabs-list:hover:text-foreground",
        "group-data-[variant=default]/tabs-list:data-active:bg-background group-data-[variant=default]/tabs-list:data-active:text-foreground dark:group-data-[variant=default]/tabs-list:data-active:bg-input/30 dark:group-data-[variant=default]/tabs-list:data-active:text-foreground",
        "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent group-data-[variant=line]/tabs-list:data-active:shadow-none group-data-[variant=line]/tabs-list:rounded-none dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
        "group-data-[variant=line]/tabs-list:h-[calc(100%-1px)] group-data-[variant=line]/tabs-list:px-1.5 group-data-[variant=line]/tabs-list:py-0.5 group-data-[variant=line]/tabs-list:text-foreground/60 group-data-[variant=line]/tabs-list:hover:text-foreground dark:group-data-[variant=line]/tabs-list:text-muted-foreground dark:group-data-[variant=line]/tabs-list:hover:text-foreground",
        "group-data-[variant=line]/tabs-list:data-active:bg-transparent group-data-[variant=line]/tabs-list:data-active:text-foreground dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:text-foreground",
        "group-data-[variant=line]/tabs-list:after:absolute group-data-[variant=line]/tabs-list:after:bg-foreground group-data-[variant=line]/tabs-list:after:opacity-0 group-data-[variant=line]/tabs-list:after:transition-opacity group-data-[variant=line]/tabs-list:data-active:after:opacity-100 group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:after:inset-x-0 group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:after:bottom-[-5px] group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:after:h-0.5 group-data-vertical/tabs:group-data-[variant=line]/tabs-list:after:inset-y-0 group-data-vertical/tabs:group-data-[variant=line]/tabs-list:after:-right-1 group-data-vertical/tabs:group-data-[variant=line]/tabs-list:after:w-0.5",
        "group-data-[variant=pill]/tabs-list:relative group-data-[variant=pill]/tabs-list:z-10 group-data-[variant=pill]/tabs-list:rounded-[var(--radius-md)] group-data-[variant=pill]/tabs-list:px-2.5 group-data-[variant=pill]/tabs-list:py-1.5 group-data-[variant=pill]/tabs-list:text-muted-foreground group-data-[variant=pill]/tabs-list:hover:text-foreground group-data-[variant=pill]/tabs-list:data-active:text-foreground",
        "group-data-[variant=filter]/tabs-list:h-8 group-data-[variant=filter]/tabs-list:flex-initial group-data-[variant=filter]/tabs-list:rounded-sm group-data-[variant=filter]/tabs-list:border group-data-[variant=filter]/tabs-list:px-3 group-data-[variant=filter]/tabs-list:text-sm group-data-[variant=filter]/tabs-list:border-border group-data-[variant=filter]/tabs-list:bg-background group-data-[variant=filter]/tabs-list:text-muted-foreground group-data-[variant=filter]/tabs-list:hover:border-foreground/15 group-data-[variant=filter]/tabs-list:hover:bg-[#fafafa] dark:group-data-[variant=filter]/tabs-list:hover:bg-gray-800/50 group-data-[variant=filter]/tabs-list:hover:text-foreground group-data-[variant=filter]/tabs-list:focus-visible:ring-3 group-data-[variant=filter]/tabs-list:focus-visible:ring-ring/50",
        "group-data-[variant=filter]/tabs-list:data-active:border-foreground/15 group-data-[variant=filter]/tabs-list:data-active:bg-[#fafafa] dark:group-data-[variant=filter]/tabs-list:data-active:bg-gray-800/50 group-data-[variant=filter]/tabs-list:data-active:text-foreground",
        "group-data-[variant=bleedLine]/tabs-list:flex-1 group-data-[variant=bleedLine]/tabs-list:min-w-0 group-data-[variant=bleedLine]/tabs-list:rounded-none group-data-[variant=bleedLine]/tabs-list:border-0 group-data-[variant=bleedLine]/tabs-list:bg-transparent group-data-[variant=bleedLine]/tabs-list:px-0 group-data-[variant=bleedLine]/tabs-list:py-2.5 group-data-[variant=bleedLine]/tabs-list:text-[13px] group-data-[variant=bleedLine]/tabs-list:leading-5 group-data-[variant=bleedLine]/tabs-list:font-semibold group-data-[variant=bleedLine]/tabs-list:uppercase group-data-[variant=bleedLine]/tabs-list:tracking-[0.06em] group-data-[variant=bleedLine]/tabs-list:text-muted-foreground group-data-[variant=bleedLine]/tabs-list:transition-[color,border-color] group-data-[variant=bleedLine]/tabs-list:hover:text-primary group-data-[variant=bleedLine]/tabs-list:-mb-px group-data-[variant=bleedLine]/tabs-list:border-b-2 group-data-[variant=bleedLine]/tabs-list:border-transparent group-data-[variant=bleedLine]/tabs-list:shadow-none group-data-[variant=bleedLine]/tabs-list:data-active:border-b-primary group-data-[variant=bleedLine]/tabs-list:data-active:bg-transparent group-data-[variant=bleedLine]/tabs-list:data-active:text-primary group-data-[variant=bleedLine]/tabs-list:data-active:shadow-none",
        className
      )
    }, props)
  );
}
function TabsContent(_a) {
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    tabs.Tabs.Panel,
    __spreadValues({
      "data-slot": "tabs-content",
      className: cn("flex-1 text-sm outline-none", className)
    }, props)
  );
}

exports.Tabs = Tabs;
exports.TabsContent = TabsContent;
exports.TabsList = TabsList;
exports.TabsTrigger = TabsTrigger;
exports.tabsListVariants = tabsListVariants;
//# sourceMappingURL=tabs.cjs.map
//# sourceMappingURL=tabs.cjs.map