import { D as DndHandleButton, a as DndHandle } from './DndHandleButton-Ck5nc8w2.js';
import { jsx } from 'react/jsx-runtime';
import { c as cx } from './index-De1g9FRV.js';
import { forwardRef } from 'react';

import './index.css';const styles = {
	"drag-preview": "_drag-preview_19oyg_2",
	"drop-line": "_drop-line_19oyg_12",
	"orientation-horizontal": "_orientation-horizontal_19oyg_43",
	"orientation-vertical": "_orientation-vertical_19oyg_52",
	"drop-zone": "_drop-zone_19oyg_61",
	"position-before": "_position-before_19oyg_68",
	"position-after": "_position-after_19oyg_73",
	"can-be-dropped": "_can-be-dropped_19oyg_87",
	"active-not-over": "_active-not-over_19oyg_94",
	"over-valid": "_over-valid_19oyg_100",
	"over-invalid": "_over-invalid_19oyg_105"
};

const DndSortLine = ({
  offset,
  orientation,
  position,
  ...rest
}) => {
  const classes = cx(
    styles["drop-line"],
    styles[`orientation-${orientation}`],
    styles[`position-${position}`]
  );
  return /* @__PURE__ */ jsx(
    "div",
    {
      "aria-hidden": true,
      className: classes,
      style: { "--a2-inline-drop-line-offset": offset },
      ...rest
    }
  );
};

const DndZone = forwardRef(
  ({
    el: Component = "div",
    children,
    className,
    isDragging,
    isOver,
    isValid,
    ...rest
  }, ref) => {
    const classes = cx(className, {
      [styles["drop-zone"]]: true,
      [styles["over-valid"]]: isDragging && isOver && isValid,
      [styles["over-invalid"]]: isDragging && isOver && !isValid,
      [styles["active-not-over"]]: isDragging && !isOver
    });
    return /* @__PURE__ */ jsx(Component, { ref, className: classes, ...rest, children });
  }
);
DndZone.displayName = "DndZoneBase";

const Dnd = {
  Handle: DndHandle,
  HandleButton: DndHandleButton,
  SortLine: DndSortLine,
  Zone: DndZone
};

export { Dnd as D, DndSortLine as a, styles as s };
//# sourceMappingURL=index-SZMmvI3D.js.map
