import { jsx, jsxs } from "react/jsx-runtime";
import { WarningSquare, Upload } from "@choiceform/icons-react";
import { memo, forwardRef } from "react";
import { t } from "../../../../i18n/index.js";
import { PromptDragZoneTv } from "./tv.js";
const PromptDragZone = memo(
  forwardRef(function PromptDragZone2(props, ref) {
    const {
      isDragging,
      unsupported = false,
      className,
      maxFileSize = 10 * 1024 * 1024,
      maxFiles = 10,
      ...rest
    } = props;
    const labelUnsupported = t("drag-zone", "label-unsupported");
    const labelDefault = t("drag-zone", "label-default");
    const descriptionUnsupported = t("drag-zone", "description-unsupported");
    const descriptionDefault = t("drag-zone", "description-default", {
      "max-file-size": maxFileSize,
      "max-files": maxFiles
    });
    const labelText = unsupported ? labelUnsupported : labelDefault;
    const descText = unsupported ? descriptionUnsupported : descriptionDefault;
    const icon = unsupported ? /* @__PURE__ */ jsx(WarningSquare, {}) : /* @__PURE__ */ jsx(Upload, {});
    const tv = PromptDragZoneTv({
      isDragging,
      unsupported
    });
    return /* @__PURE__ */ jsx(
      "div",
      {
        ref,
        className: tv.root({ className }),
        ...rest,
        children: /* @__PURE__ */ jsxs("div", { className: tv.content(), children: [
          /* @__PURE__ */ jsxs("div", { className: tv.label(), children: [
            icon,
            /* @__PURE__ */ jsx("span", { children: labelText })
          ] }),
          /* @__PURE__ */ jsx("p", { className: tv.description(), children: descText })
        ] })
      }
    );
  })
);
export {
  PromptDragZone
};
//# sourceMappingURL=prompt-drag-zone.js.map
