// src/utils/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
  return twMerge(clsx(inputs));
}

// src/components/Text/Text.tsx
import { jsx } from "react/jsx-runtime";
var Text = ({
  children,
  size = "md",
  weight = "normal",
  color = "text-text-950",
  as,
  className = "",
  ...props
}) => {
  let sizeClasses;
  let weightClasses;
  const sizeClassMap = {
    "2xs": "text-2xs",
    xs: "text-xs",
    sm: "text-sm",
    md: "text-md",
    lg: "text-lg",
    xl: "text-xl",
    "2xl": "text-2xl",
    "3xl": "text-3xl",
    "4xl": "text-4xl",
    "5xl": "text-5xl",
    "6xl": "text-6xl"
  };
  sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
  const weightClassMap = {
    hairline: "font-hairline",
    light: "font-light",
    normal: "font-normal",
    medium: "font-medium",
    semibold: "font-semibold",
    bold: "font-bold",
    extrabold: "font-extrabold",
    black: "font-black"
  };
  weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
  const baseClasses = "font-primary";
  const Component = as ?? "p";
  return /* @__PURE__ */ jsx(
    Component,
    {
      className: cn(baseClasses, sizeClasses, weightClasses, color, className),
      ...props,
      children
    }
  );
};
var Text_default = Text;

// src/components/Button/Button.tsx
import { forwardRef } from "react";
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
var VARIANT_ACTION_CLASSES = {
  solid: {
    primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
    secondary: "bg-text-950 text-text border border-text-800 hover:bg-text-800 hover:border-text-950 focus-visible:outline-none focus-visible:bg-text-900 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-text-700 active:border-text-700 disabled:bg-text-500 disabled:border-text-500 disabled:opacity-40 disabled:cursor-not-allowed",
    positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
    negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
  },
  outline: {
    primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
    secondary: "bg-transparent text-text-950 border border-text-800 hover:bg-background-50 hover:text-text-700 hover:border-text-700 focus-visible:border-0 focus-visible:outline-none focus-visible:text-text-900 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-text-700 active:border-text-700 disabled:opacity-40 disabled:cursor-not-allowed",
    positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
    negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
  },
  link: {
    primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
    secondary: "bg-transparent text-text-950 hover:text-text-800 focus-visible:outline-none focus-visible:text-text-900 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-text-700 disabled:opacity-40 disabled:cursor-not-allowed",
    positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
    negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
  }
};
var SIZE_CLASSES = {
  "extra-small": "text-xs px-3.5 py-2",
  small: "text-sm px-4 py-2.5",
  medium: "text-md px-5 py-2.5",
  large: "text-lg px-6 py-3",
  "extra-large": "text-lg px-7 py-3.5"
};
var Button = forwardRef(
  ({
    children,
    iconLeft,
    iconRight,
    size = "medium",
    variant = "solid",
    action = "primary",
    className = "",
    disabled,
    type = "button",
    ...props
  }, ref) => {
    if (variant === "raw") {
      return /* @__PURE__ */ jsxs(
        "button",
        {
          ref,
          className,
          disabled,
          type,
          ...props,
          children: [
            iconLeft && /* @__PURE__ */ jsx2("span", { className: "mr-2 flex items-center", children: iconLeft }),
            children,
            iconRight && /* @__PURE__ */ jsx2("span", { className: "ml-2 flex items-center", children: iconRight })
          ]
        }
      );
    }
    const sizeClasses = SIZE_CLASSES[size];
    const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
    const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
    return /* @__PURE__ */ jsxs(
      "button",
      {
        ref,
        className: cn(baseClasses, variantClasses, sizeClasses, className),
        disabled,
        type,
        ...props,
        children: [
          iconLeft && /* @__PURE__ */ jsx2("span", { className: "mr-2 flex items-center", children: iconLeft }),
          children,
          iconRight && /* @__PURE__ */ jsx2("span", { className: "ml-2 flex items-center", children: iconRight })
        ]
      }
    );
  }
);
Button.displayName = "Button";
var Button_default = Button;

// src/components/Select/Select.tsx
import { create, useStore } from "zustand";
import {
  useEffect,
  useRef,
  useState,
  useCallback,
  forwardRef as forwardRef2,
  isValidElement,
  Children,
  cloneElement,
  useId
} from "react";
import { createPortal } from "react-dom";
import { CaretDown, Check, WarningCircle } from "phosphor-react";
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
var VARIANT_CLASSES = {
  outlined: "border-2 rounded-lg focus:border-primary-950",
  underlined: "border-b-2 focus:border-primary-950",
  rounded: "border-2 rounded-full focus:border-primary-950"
};
var SIZE_CLASSES2 = {
  small: "text-sm",
  medium: "text-md",
  large: "text-lg",
  "extra-large": "text-lg"
};
var HEIGHT_CLASSES = {
  small: "h-8",
  medium: "h-9",
  large: "h-10",
  "extra-large": "h-12"
};
var PADDING_CLASSES = {
  small: "px-2 py-1",
  medium: "px-3 py-2",
  large: "px-4 py-3",
  "extra-large": "px-5 py-4"
};
function createSelectStore(onValueChange) {
  return create((set) => ({
    open: false,
    setOpen: (open) => set({ open }),
    value: "",
    setValue: (value) => set({ value }),
    selectedLabel: "",
    setSelectedLabel: (label) => set({ selectedLabel: label }),
    onValueChange,
    triggerRect: null,
    setTriggerRect: (rect) => set({ triggerRect: rect })
  }));
}
var useSelectStore = (externalStore) => {
  if (!externalStore) {
    throw new Error(
      "Component must be used within a Select (store is missing)"
    );
  }
  return externalStore;
};
function getLabelAsNode(children) {
  if (typeof children === "string" || typeof children === "number") {
    return children;
  }
  const flattened = Children.toArray(children);
  if (flattened.length === 1) return flattened[0];
  return /* @__PURE__ */ jsx3(Fragment, { children: flattened });
}
var injectStore = (children, store, size, selectId) => {
  return Children.map(children, (child) => {
    if (isValidElement(child)) {
      const typedChild = child;
      const newProps = {
        store
      };
      if (typedChild.type === SelectTrigger) {
        newProps.size = size;
        newProps.selectId = selectId;
      }
      if (typedChild.type === SelectContent) {
        newProps.selectId = selectId;
      }
      if (typedChild.props.children) {
        newProps.children = injectStore(
          typedChild.props.children,
          store,
          size,
          selectId
        );
      }
      return cloneElement(typedChild, newProps);
    }
    return child;
  });
};
var Select = ({
  children,
  defaultValue = "",
  className,
  value: propValue,
  onValueChange,
  size = "small",
  label,
  helperText,
  errorMessage,
  id
}) => {
  const storeRef = useRef(null);
  storeRef.current ??= createSelectStore(onValueChange);
  const store = storeRef.current;
  const selectRef = useRef(null);
  const { open, setOpen, setValue, selectedLabel } = useStore(store, (s) => s);
  const generatedId = useId();
  const selectId = id ?? `select-${generatedId}`;
  const findLabelForValue = (children2, targetValue) => {
    let found = null;
    const search = (nodes) => {
      Children.forEach(nodes, (child) => {
        if (!isValidElement(child)) return;
        const typedChild = child;
        if (typedChild.type === SelectItem && typedChild.props.value === targetValue) {
          if (typeof typedChild.props.children === "string")
            found = typedChild.props.children;
        }
        if (typedChild.props.children && !found)
          search(typedChild.props.children);
      });
    };
    search(children2);
    return found;
  };
  useEffect(() => {
    if (!selectedLabel && defaultValue) {
      const label2 = findLabelForValue(children, defaultValue);
      if (label2) store.setState({ selectedLabel: label2 });
    }
  }, [children, defaultValue, selectedLabel]);
  useEffect(() => {
    const handleClickOutside = (event) => {
      const target = event.target;
      const isInsideTrigger = selectRef.current?.contains(target);
      const portaledMenu = document.body.querySelector(
        `[role="menu"][data-select-id="${selectId}"]`
      );
      const isInsidePortaledMenu = portaledMenu?.contains(target);
      if (!isInsideTrigger && !isInsidePortaledMenu) {
        setOpen(false);
      }
    };
    const handleArrowKeys = (event) => {
      const selectContent = document.body.querySelector(
        `[role="menu"][data-select-id="${selectId}"]`
      );
      if (selectContent) {
        event.preventDefault();
        const items = Array.from(
          selectContent.querySelectorAll(
            '[role="menuitem"]:not([aria-disabled="true"])'
          )
        ).filter((el) => el instanceof HTMLElement);
        const focused = document.activeElement;
        const currentIndex = items.findIndex((item) => item === focused);
        let nextIndex;
        if (event.key === "ArrowDown") {
          nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % items.length;
        } else {
          nextIndex = currentIndex === -1 ? items.length - 1 : (currentIndex - 1 + items.length) % items.length;
        }
        items[nextIndex]?.focus();
      }
    };
    if (open) {
      document.addEventListener("mousedown", handleClickOutside);
      document.addEventListener("keydown", handleArrowKeys);
    }
    return () => {
      document.removeEventListener("mousedown", handleClickOutside);
      document.removeEventListener("keydown", handleArrowKeys);
    };
  }, [open, selectId, setOpen]);
  useEffect(() => {
    if (propValue === void 0) return;
    setValue(propValue);
    const label2 = findLabelForValue(children, propValue);
    store.setState({ selectedLabel: label2 ?? "" });
  }, [propValue, children]);
  const sizeClasses = SIZE_CLASSES2[size];
  return /* @__PURE__ */ jsxs2("div", { className: cn("w-full", className), children: [
    label && /* @__PURE__ */ jsx3(
      "label",
      {
        htmlFor: selectId,
        className: cn("block font-bold text-text-900 mb-1.5", sizeClasses),
        children: label
      }
    ),
    /* @__PURE__ */ jsx3("div", { className: cn("relative w-full"), ref: selectRef, children: injectStore(children, store, size, selectId) }),
    (helperText || errorMessage) && /* @__PURE__ */ jsxs2("div", { className: "mt-1.5 gap-1.5", children: [
      helperText && /* @__PURE__ */ jsx3("p", { className: "text-sm text-text-500", children: helperText }),
      errorMessage && /* @__PURE__ */ jsxs2("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
        /* @__PURE__ */ jsx3(WarningCircle, { size: 16 }),
        " ",
        errorMessage
      ] })
    ] })
  ] });
};
var SelectValue = ({
  placeholder,
  store: externalStore
}) => {
  const store = useSelectStore(externalStore);
  const selectedLabel = useStore(store, (s) => s.selectedLabel);
  const value = useStore(store, (s) => s.value);
  return /* @__PURE__ */ jsx3("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
};
var SelectTrigger = forwardRef2(
  ({
    className,
    invalid = false,
    variant = "outlined",
    store: externalStore,
    disabled,
    size = "medium",
    selectId,
    type = "button",
    ...props
  }, ref) => {
    const store = useSelectStore(externalStore);
    const open = useStore(store, (s) => s.open);
    const internalRef = useRef(null);
    const setRefs = useCallback(
      (element) => {
        internalRef.current = element;
        if (typeof ref === "function") {
          ref(element);
        } else if (ref) {
          ref.current = element;
        }
      },
      [ref]
    );
    const updateTriggerRect = useCallback(() => {
      if (internalRef.current) {
        const rect = internalRef.current.getBoundingClientRect();
        store.setState({
          triggerRect: {
            top: rect.top,
            left: rect.left,
            width: rect.width,
            height: rect.height
          }
        });
      }
    }, [store]);
    useEffect(() => {
      if (!open) return;
      const handleUpdate = () => {
        updateTriggerRect();
      };
      window.addEventListener("scroll", handleUpdate, true);
      window.addEventListener("resize", handleUpdate);
      return () => {
        window.removeEventListener("scroll", handleUpdate, true);
        window.removeEventListener("resize", handleUpdate);
      };
    }, [open, updateTriggerRect]);
    const toggleOpen = () => {
      const newOpen = !open;
      if (newOpen) {
        updateTriggerRect();
      }
      store.setState({ open: newOpen });
    };
    const variantClasses = VARIANT_CLASSES[variant];
    const heightClasses = HEIGHT_CLASSES[size];
    const paddingClasses = PADDING_CLASSES[size];
    return /* @__PURE__ */ jsxs2(
      "button",
      {
        ref: setRefs,
        id: selectId,
        type,
        className: cn(
          "flex w-full items-center justify-between border-border-300",
          heightClasses,
          paddingClasses,
          invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`,
          disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
          !invalid && !disabled ? "text-text-700" : "",
          variantClasses,
          className
        ),
        onClick: toggleOpen,
        "aria-expanded": open,
        "aria-haspopup": "listbox",
        "aria-controls": open ? "select-content" : void 0,
        ...props,
        children: [
          props.children,
          /* @__PURE__ */ jsx3(
            CaretDown,
            {
              className: cn(
                "h-[1em] w-[1em] opacity-50 transition-transform",
                open ? "rotate-180" : ""
              )
            }
          )
        ]
      }
    );
  }
);
SelectTrigger.displayName = "SelectTrigger";
function applyVerticalPosition(styles, triggerRect, side, align, gap) {
  styles.top = side === "top" ? triggerRect.top - gap : triggerRect.top + triggerRect.height + gap;
  styles.transform = side === "top" ? "translateY(-100%)" : void 0;
  if (align === "start") {
    styles.left = triggerRect.left;
  } else if (align === "center") {
    styles.left = triggerRect.left + triggerRect.width / 2;
    styles.transform = side === "top" ? "translate(-50%, -100%)" : "translateX(-50%)";
  } else {
    styles.left = triggerRect.left + triggerRect.width;
    styles.transform = side === "top" ? "translate(-100%, -100%)" : "translateX(-100%)";
  }
}
function applyHorizontalPosition(styles, triggerRect, side, align, gap) {
  styles.left = side === "left" ? triggerRect.left - gap : triggerRect.left + triggerRect.width + gap;
  styles.transform = side === "left" ? "translateX(-100%)" : void 0;
  if (align === "start") {
    styles.top = triggerRect.top;
  } else if (align === "center") {
    styles.top = triggerRect.top + triggerRect.height / 2;
    styles.transform = side === "left" ? "translate(-100%, -50%)" : "translateY(-50%)";
  } else {
    styles.top = triggerRect.top + triggerRect.height;
    styles.transform = side === "left" ? "translate(-100%, -100%)" : "translateY(-100%)";
  }
}
var SelectContent = forwardRef2(
  ({
    children,
    className,
    align = "start",
    side = "bottom",
    store: externalStore,
    selectId,
    ...props
  }, ref) => {
    const store = useSelectStore(externalStore);
    const open = useStore(store, (s) => s.open);
    const triggerRect = useStore(store, (s) => s.triggerRect);
    const [mounted, setMounted] = useState(false);
    useEffect(() => {
      setMounted(true);
    }, []);
    if (!open || !mounted) return null;
    const getPositionStyles = () => {
      if (!triggerRect) {
        return {};
      }
      const gap = 4;
      const styles = {
        position: "fixed",
        zIndex: 9999
      };
      const isVertical = side === "top" || side === "bottom";
      if (isVertical) {
        applyVerticalPosition(styles, triggerRect, side, align, gap);
      } else {
        applyHorizontalPosition(styles, triggerRect, side, align, gap);
      }
      return styles;
    };
    const content = /* @__PURE__ */ jsx3(
      "div",
      {
        role: "menu",
        ref,
        "data-select-id": selectId,
        style: getPositionStyles(),
        className: cn(
          "bg-secondary min-w-[210px] max-h-[300px] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md border-border-100",
          className
        ),
        ...props,
        children
      }
    );
    return createPortal(content, document.body);
  }
);
SelectContent.displayName = "SelectContent";
var SelectItem = forwardRef2(
  ({
    className,
    children,
    value,
    disabled = false,
    store: externalStore,
    truncate = false,
    ...props
  }, ref) => {
    const store = useSelectStore(externalStore);
    const {
      value: selectedValue,
      setValue,
      setOpen,
      setSelectedLabel,
      onValueChange
    } = useStore(store, (s) => s);
    const handleClick = (e) => {
      const labelNode = getLabelAsNode(children);
      if (!disabled) {
        setValue(value);
        setSelectedLabel(labelNode);
        setOpen(false);
        onValueChange?.(value);
      }
      props.onClick?.(e);
    };
    return /* @__PURE__ */ jsxs2(
      "div",
      {
        role: "menuitem",
        "aria-disabled": disabled,
        ref,
        className: `
          bg-secondary focus-visible:bg-background-50
          relative flex select-none items-center gap-2 rounded-sm p-3 outline-none transition-colors [&>svg]:size-4 [&>svg]:shrink-0
          ${className}
          ${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
          ${selectedValue === value && "bg-background-50"}
        `,
        onClick: handleClick,
        onKeyDown: (e) => {
          if (e.key === "Enter" || e.key === " ") handleClick(e);
        },
        tabIndex: disabled ? -1 : 0,
        ...props,
        children: [
          /* @__PURE__ */ jsx3("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ jsx3(Check, { className: "" }) }),
          truncate ? /* @__PURE__ */ jsx3("span", { className: "truncate block max-w-[200px]", children }) : children
        ]
      }
    );
  }
);
SelectItem.displayName = "SelectItem";
var Select_default = Select;

// src/components/StatisticsCard/StatisticsCard.tsx
import { Plus } from "phosphor-react";
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
var VARIANT_STYLES = {
  high: "bg-success-background",
  medium: "bg-warning-background",
  low: "bg-error-background",
  total: "bg-info-background"
};
var VALUE_TEXT_COLORS = {
  high: "text-success-700",
  medium: "text-warning-600",
  low: "text-error-700",
  total: "text-info-700"
};
var StatCard = ({ item, showPlaceholder = false }) => {
  return /* @__PURE__ */ jsxs3(
    "div",
    {
      className: `rounded-xl py-[17px] px-6 min-h-[105px] flex flex-col justify-center items-start gap-1 ${VARIANT_STYLES[item.variant]}`,
      children: [
        /* @__PURE__ */ jsx4(
          Text_default,
          {
            size: "4xl",
            weight: "bold",
            className: `${VALUE_TEXT_COLORS[item.variant]} leading-[42px] tracking-[0.2px] self-stretch`,
            children: showPlaceholder ? "-" : item.value
          }
        ),
        /* @__PURE__ */ jsx4(
          Text_default,
          {
            size: "xs",
            weight: "bold",
            className: "uppercase text-[8px] leading-[9px] text-text-800 whitespace-nowrap",
            children: item.label
          }
        )
      ]
    }
  );
};
var getGridColumnsClass = (itemCount) => {
  if (itemCount === 4) return "lg:grid-cols-4";
  if (itemCount === 3) return "lg:grid-cols-3";
  if (itemCount === 2) return "lg:grid-cols-2";
  return "lg:grid-cols-1";
};
var StatisticsCard = ({
  title,
  data,
  showPlaceholder = false,
  emptyStateMessage,
  emptyStateButtonText,
  onEmptyStateButtonClick,
  dropdownOptions,
  selectedDropdownValue,
  onDropdownChange,
  selectPlaceholder = "Selecione um per\xEDodo",
  dropdownAriaLabel = "Filtro de per\xEDodo",
  className = ""
}) => {
  const hasData = data && data.length > 0;
  const gridColumnsClass = hasData ? getGridColumnsClass(data.length) : "";
  return /* @__PURE__ */ jsxs3(
    "div",
    {
      className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
      children: [
        /* @__PURE__ */ jsxs3("div", { className: "flex flex-row justify-between items-center gap-4", children: [
          /* @__PURE__ */ jsx4(
            Text_default,
            {
              as: "h3",
              size: "sm",
              weight: "medium",
              color: "text-text-600",
              className: "flex-1 min-w-0",
              children: title
            }
          ),
          dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ jsx4("div", { className: "w-[120px] min-w-[90px] sm:shrink-0", children: /* @__PURE__ */ jsxs3(
            Select_default,
            {
              value: selectedDropdownValue,
              onValueChange: onDropdownChange,
              size: "medium",
              children: [
                /* @__PURE__ */ jsx4(
                  SelectTrigger,
                  {
                    className: "border border-border-300 rounded [&>span]:whitespace-nowrap [&>span]:overflow-hidden [&>span]:text-ellipsis",
                    "aria-label": dropdownAriaLabel,
                    children: /* @__PURE__ */ jsx4(SelectValue, { placeholder: selectPlaceholder })
                  }
                ),
                /* @__PURE__ */ jsx4(SelectContent, { className: "min-w-[120px]", children: dropdownOptions.map((option) => /* @__PURE__ */ jsx4(
                  SelectItem,
                  {
                    value: option.value,
                    className: "whitespace-nowrap",
                    children: option.label
                  },
                  option.value
                )) })
              ]
            }
          ) })
        ] }),
        hasData ? /* @__PURE__ */ jsx4(
          "div",
          {
            className: `grid grid-cols-1 sm:grid-cols-2 gap-[13px] ${gridColumnsClass}`,
            children: data.map((item, index) => /* @__PURE__ */ jsx4(
              StatCard,
              {
                item,
                showPlaceholder
              },
              `${item.variant}-${item.label}-${index}`
            ))
          }
        ) : /* @__PURE__ */ jsxs3("div", { className: "border border-dashed border-border-300 rounded-lg p-6 min-h-[105px] flex flex-col items-center justify-center gap-2", children: [
          /* @__PURE__ */ jsx4(
            Text_default,
            {
              size: "sm",
              color: "text-text-600",
              className: "text-center max-w-md",
              children: emptyStateMessage
            }
          ),
          onEmptyStateButtonClick && /* @__PURE__ */ jsx4(
            Button_default,
            {
              variant: "outline",
              action: "primary",
              size: "small",
              onClick: onEmptyStateButtonClick,
              iconLeft: /* @__PURE__ */ jsx4(Plus, { size: 16, weight: "bold" }),
              children: emptyStateButtonText
            }
          )
        ] })
      ]
    }
  );
};
export {
  StatisticsCard
};
//# sourceMappingURL=index.mjs.map