'use strict';
'use client';
import { jsx } from 'react/jsx-runtime';
import * as ResizablePrimitive from 'react-resizable-panels';
import { cn } from '../../../../fd-toolbox/lib/utils.js';
import { Icon, iconSizes, iconNames } from '../../../fd-component-toolbox/icon/Icon.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function ResizablePanelGroup({
  className,
  direction,
  ref,
  autoSaveId,
  onLayout,
  children
}) {
  return /* @__PURE__ */jsx(ResizablePrimitive.PanelGroup, {
    direction,
    ref,
    className: cn("flex size-full data-[panel-group-direction=vertical]:flex-col", className),
    autoSaveId,
    onLayout,
    children
  });
}
__name(ResizablePanelGroup, "ResizablePanelGroup");
ResizablePanelGroup.displayName = ResizablePrimitive.PanelGroup.displayName;
const ResizablePanel = ResizablePrimitive.Panel;
function ResizableHandle({
  withHandle,
  className
}) {
  return /* @__PURE__ */jsx(ResizablePrimitive.PanelResizeHandle, {
    className: cn("bg-border relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2", "focus-visible:ring-primary after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-none", "data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full", "data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1", "data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2", "data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className),
    children: withHandle && /* @__PURE__ */jsx("div", {
      className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border",
      children: /* @__PURE__ */jsx(Icon, {
        name: iconNames.dragHandleDots2,
        size: iconSizes.extraSmall
      })
    })
  });
}
__name(ResizableHandle, "ResizableHandle");

export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
