"use client";
import { j as o } from "../../../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import { Flex as f, Collapse as u, Text as j, FileButton as y } from "@mantine/core";
import C from "../../../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.mjs";
import F from "../../../Button/index.mjs";
import { HpSelect as b } from "../../../Select/index.mjs";
import P from "../../../TextInput/index.mjs";
import s from "./PlatformUpload.module.scss.mjs";
import T from "../../../../../node_modules/.pnpm/@tabler_icons-react@3.34.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFile.mjs";
import g from "../../../../../node_modules/.pnpm/@tabler_icons-react@3.34.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.mjs";
function S({
  platformName: a,
  uploaded: r,
  uploadZipName: n,
  onExePathChanged: c,
  onRemoveUpload: h,
  exeInputProps: i,
  i18n: e = {
    chooseFile: "Choose File",
    exePathPlaceholder: "Executable path (from build root directory)"
  },
  className: m,
  exeList: t,
  ...p
}) {
  function d() {
    h();
  }
  let l = null;
  return r ? l = /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
    /* @__PURE__ */ o.jsx(j, { color: "#94A2B3", children: n }),
    /* @__PURE__ */ o.jsx("button", { onClick: d, className: "center", type: "button", children: /* @__PURE__ */ o.jsx(g, { size: 20 }) })
  ] }) : l = /* @__PURE__ */ o.jsx(y, { onChange: c, accept: "application/zip", children: (x) => /* @__PURE__ */ o.jsx(F, { type: "secondary", htmlType: "button", ...x, children: e.chooseFile }) }), /* @__PURE__ */ o.jsxs("div", { className: C(m, s.rootContainer), ...p, children: [
    /* @__PURE__ */ o.jsxs(f, { className: s.uploadRowContainer, children: [
      a,
      l
    ] }),
    /* @__PURE__ */ o.jsx(
      u,
      {
        in: r,
        transitionDuration: 500,
        style: { width: "100%", display: "block" },
        children: t && t.length > 0 ? /* @__PURE__ */ o.jsx(
          b,
          {
            data: t,
            placeholder: e.exePathPlaceholder,
            ...i
          }
        ) : /* @__PURE__ */ o.jsx(
          P,
          {
            leftSection: /* @__PURE__ */ o.jsx(T, { size: 48, strokeWidth: 2, color: "grey" }),
            placeholder: e.exePathPlaceholder,
            ...i
          }
        )
      }
    )
  ] });
}
export {
  S as default
};
//# sourceMappingURL=index.mjs.map
