"use client";
import { j as e } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import { useState as x } from "react";
import { ReactComponent as C } from "../../assets/images/TrashCan.svg.mjs";
import P from "../Button/index.mjs";
import { ContainerInteractive as I } from "../ContainerInteractive/index.mjs";
import { RewardDetails as b } from "../RewardDetails/index.mjs";
import j from "./RewardsSummary.module.scss.mjs";
import { FormRewards as R } from "./components/FormRewards/index.mjs";
import U from "../../../node_modules/.pnpm/@tabler_icons-react@3.34.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.mjs";
function F({
  title: o,
  editable: v,
  onEditableChange: w,
  removeReward: T,
  i18n: r = {
    remove: "Remove",
    confirm: "Confirm Changes",
    addTokenId: "Add Token ID",
    placeholder: {
      rewardType: "Please Select a Reward Type",
      network: "Please Select a Network",
      contractAddress: "Please Enter a Contract Address",
      tokenName: "Please Enter a Token Name",
      marketplaceUrl: "Please Enter a Marketplace URL",
      decimals: "0",
      amountPerUser: "0"
    },
    label: {
      rewardType: "Reward Type",
      network: "Chain",
      contractAddress: "Contract Address",
      tokenName: "Token Name",
      marketplaceUrl: "Marketplace URL",
      decimals: "Decimals",
      amountPerUser: "Amount Per User"
    }
  },
  ...t
}) {
  var c, i, d, u, p, k, f;
  const [a, h] = x(v), n = (y) => {
    w(y), h(y);
  };
  let l = /* @__PURE__ */ e.jsx("button", { onClick: () => n(!0), type: "button", children: /* @__PURE__ */ e.jsx(U, { color: "var(--color-neutral-400)" }) });
  a && (l = /* @__PURE__ */ e.jsx(
    P,
    {
      type: "tertiary",
      rightIcon: /* @__PURE__ */ e.jsx(C, { fill: "var(--color-neutral-400)" }),
      onClick: T,
      htmlType: "button",
      children: r.remove
    }
  ));
  let s = /* @__PURE__ */ e.jsx(
    b,
    {
      title: o,
      chainName: (c = t.networkInputProps) == null ? void 0 : c.value,
      tokenType: (d = (i = t.rewardTypeInputProps) == null ? void 0 : i.value) == null ? void 0 : d.text,
      tokenSymbol: (u = t.tokenNameInputProps) == null ? void 0 : u.value,
      rewardPerPlayer: (p = t.amountPerUserInputProps) == null ? void 0 : p.value,
      marketplace: (k = t.marketplaceUrlInputProps) == null ? void 0 : k.value,
      tokenContractAddress: (f = t.contractAddressInputProps) == null ? void 0 : f.value
    }
  );
  a && (s = /* @__PURE__ */ e.jsx(R, { i18n: r, ...t }));
  let m = null;
  return a && (m = /* @__PURE__ */ e.jsx(
    P,
    {
      type: "secondary",
      onClick: () => n(!1),
      htmlType: "button",
      children: r.confirm
    }
  )), /* @__PURE__ */ e.jsxs(
    I,
    {
      title: o,
      icon: l,
      classNames: { root: j.root },
      children: [
        s,
        m
      ]
    }
  );
}
export {
  F as RewardsSummary
};
//# sourceMappingURL=index.mjs.map
