import { N as a, a as d, o as h, p as g, q as u, j as e, M as p, aT as m, i as x } from "./index-c65ca4a4.mjs";
import { F as f } from "./Form-f4ced0f0.mjs";
import { I as j } from "./IntegrationHeader-a0a2e0a4.mjs";
const E = a.create(() => {
  const { updateRoute: s } = d(), t = a.useModal(), { settings: n } = h(), [o] = g(n, ["unsplash"]), { mutateAsync: l } = u(), r = async (i) => {
    const c = [
      { key: "unsplash", value: i.target.checked }
    ];
    await l(c);
  };
  return /* @__PURE__ */ e.jsxs(
    p,
    {
      afterClose: () => {
        s("integrations");
      },
      okColor: "black",
      okLabel: "Save & close",
      testId: "unsplash-modal",
      title: "",
      onOk: () => {
        t.remove(), s("integrations");
      },
      children: [
        /* @__PURE__ */ e.jsx(
          j,
          {
            detail: "Beautiful, free photos",
            icon: /* @__PURE__ */ e.jsx(m, { className: "h-12 w-12" }),
            title: "Unsplash"
          }
        ),
        /* @__PURE__ */ e.jsx("div", { className: "mt-7", children: /* @__PURE__ */ e.jsx(f, { marginBottom: !1, grouped: !0, children: /* @__PURE__ */ e.jsx(
          x,
          {
            checked: o,
            direction: "rtl",
            hint: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
              "Enable ",
              /* @__PURE__ */ e.jsx("a", { className: "text-green", href: "https://unsplash.com", rel: "noopener noreferrer", target: "_blank", children: "Unsplash" }),
              " image integration for your posts"
            ] }),
            label: "Enable Unsplash",
            onChange: r
          }
        ) }) })
      ]
    }
  );
});
export {
  E as default
};
//# sourceMappingURL=UnsplashModal-a87ce413.mjs.map
