"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const iconsReact = require("@choiceform/icons-react");
const React = require("react");
const index = require("../../../../i18n/index.cjs");
const tv = require("./tv.cjs");
const PromptDragZone = React.memo(
  React.forwardRef(function PromptDragZone2(props, ref) {
    const {
      isDragging,
      unsupported = false,
      className,
      maxFileSize = 10 * 1024 * 1024,
      maxFiles = 10,
      ...rest
    } = props;
    const labelUnsupported = index.t("drag-zone", "label-unsupported");
    const labelDefault = index.t("drag-zone", "label-default");
    const descriptionUnsupported = index.t("drag-zone", "description-unsupported");
    const descriptionDefault = index.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__ */ jsxRuntime.jsx(iconsReact.WarningSquare, {}) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.Upload, {});
    const tv$1 = tv.PromptDragZoneTv({
      isDragging,
      unsupported
    });
    return /* @__PURE__ */ jsxRuntime.jsx(
      "div",
      {
        ref,
        className: tv$1.root({ className }),
        ...rest,
        children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tv$1.content(), children: [
          /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tv$1.label(), children: [
            icon,
            /* @__PURE__ */ jsxRuntime.jsx("span", { children: labelText })
          ] }),
          /* @__PURE__ */ jsxRuntime.jsx("p", { className: tv$1.description(), children: descText })
        ] })
      }
    );
  })
);
exports.PromptDragZone = PromptDragZone;
//# sourceMappingURL=prompt-drag-zone.cjs.map
