import { jsx as e, jsxs as i } from "react/jsx-runtime";
import { a as u } from "./index.CfQlFjZU.js";
import { n as d } from "./index.B0wX8xO7.js";
import { C as S } from "./index.dWlEA7uO.js";
import { C as m } from "./card.CVCKhKP6.js";
import { B as a } from "./Button.CpTwUWVr.js";
import { S as r } from "./shared.EdGf6tcG.js";
import "react";
import { P as f } from "./PageSection.DaF45FbK.js";
import { M as b } from "./MoreMenu.D8ne9cF5.js";
import { T as h } from "./Tooltip.Bw3DPT1B.js";
import { c as v } from "./index.CfM2L_w0.js";
const N = "creator_titleSection_j2XUl", C = "creator_title_bCLfm", I = "creator_sectionTitle_-XbWz", _ = "creator_description_r4uAM", R = "creator_section_SHDst", T = "creator_sectionLeft_iTQn3", k = "creator_senderId_RMgna", n = { titleSection: N, title: C, sectionTitle: I, description: _, section: R, sectionLeft: T, senderId: k }, p = (t) => {
  const o = [
    {
      label: "Edit",
      onClick: t.onClickEditSenderId
    },
    ...t.enableRemoveSenderId ? [
      {
        label: "Remove",
        onClick: t.onClickRemoveSenderId,
        semantic: r.DANGER
      }
    ] : []
  ], c = t.hasTollFreeNumber ? {
    label: "Remove",
    semantic: r.DANGER,
    isSmall: !0,
    disabled: t.disableRemoveButton,
    onClick: t.onClickRemoveTollFree
  } : {
    label: "Set Up",
    semantic: r.PRIMARY,
    isSmall: !0,
    onClick: t.onClickSetupTollFree
  }, s = t.hasSenderId ? /* @__PURE__ */ e(
    b,
    {
      label: "",
      items: o,
      suffixIcon: /* @__PURE__ */ e(S, { size: 24 }),
      alwaysShowIcon: !0
    }
  ) : /* @__PURE__ */ e(
    a,
    {
      label: "Set up",
      semantic: r.PRIMARY,
      isSmall: !0,
      onClick: t.onClickSetSenderId,
      disabled: !t.hasTollFreeNumber
    }
  );
  return { ...t, senderIDOptions: o, tollFreeButtonProps: c, senderIDComponent: s };
}, M = ({
  tollFreeNumber: t,
  hasTollFreeNumber: o,
  disableRemoveButton: c,
  tollFreeButtonProps: s,
  senderIDComponent: l
}) => /* @__PURE__ */ i(f, { children: [
  /* @__PURE__ */ i("div", { className: n.titleSection, children: [
    /* @__PURE__ */ e("span", { className: n.title, children: "Phone Number" }),
    /* @__PURE__ */ e("span", { children: "Set up your custom phone number in order to send SMS campaigns." })
  ] }),
  /* @__PURE__ */ e(m, { elevation: "high", children: /* @__PURE__ */ i("div", { className: n.section, children: [
    /* @__PURE__ */ i("div", { className: n.sectionLeft, children: [
      /* @__PURE__ */ e("span", { className: n.sectionTitle, children: "Toll-free" }),
      /* @__PURE__ */ i("span", { children: [
        t && `${t} | `,
        "United States of America and Canada"
      ] })
    ] }),
    /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
      d,
      {
        value: c,
        then: /* @__PURE__ */ e(h, { text: "You have active campaigns scheduled from sender ID and cannot make any changes", children: /* @__PURE__ */ e(a, { ...s }) }),
        otherwise: /* @__PURE__ */ e(a, { ...s })
      }
    ) })
  ] }) }),
  /* @__PURE__ */ e(m, { elevation: "high", children: /* @__PURE__ */ i("div", { className: v(n.section, n.senderId), children: [
    /* @__PURE__ */ e("div", { className: n.sectionLeft, children: /* @__PURE__ */ e("span", { className: n.sectionTitle, children: "Branded sender ID" }) }),
    /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
      d,
      {
        value: o,
        then: l,
        otherwise: /* @__PURE__ */ e(h, { text: "You need to set up a toll-free number first", children: l })
      }
    ) })
  ] }) })
] }), z = u(M, p);
export {
  z as P
};
