import {
  Box,
  Button,
  Heading,
  MessageModalLayout,
  ModalMobileLayout,
  Text,
  WixDesignSystemProvider
} from "@wix/design-system";
import React, { useContext } from "react";
import { RicosContext } from "./../../ricos-context/index.js";
import { PLUGIN_SETTINGS_PANEL_DISCARD_MODAL } from "./../settings-panel-discard-modal/consts.js";
import classes from "./settings-panel-discard-modal-scss.js";
const SettingsPanelDiscardModal = ({
  closeModal
}) => {
  const { t, isMobile } = useContext(RicosContext);
  const onCloseButtonClick = () => closeModal({ confirmed: false });
  const onPrimaryButtonClick = () => closeModal({ confirmed: true });
  const MobileLayout = () => /* @__PURE__ */ React.createElement(
    ModalMobileLayout,
    {
      dataHook: PLUGIN_SETTINGS_PANEL_DISCARD_MODAL,
      onCloseButtonClick,
      title: /* @__PURE__ */ React.createElement(Heading, { size: "medium" }, t("PluginSettingsPanel_DiscardModal_Title")),
      content: /* @__PURE__ */ React.createElement(Text, { size: "medium" }, t("PluginSettingsPanel_DiscardModal_Content")),
      footer: /* @__PURE__ */ React.createElement(Box, { align: "right" }, /* @__PURE__ */ React.createElement(Box, { marginRight: "12px" }, /* @__PURE__ */ React.createElement(Button, { priority: "secondary", size: "small", onClick: onCloseButtonClick }, t("PluginSettingsPanel_DiscardModal_SecondaryButton_Text"))), /* @__PURE__ */ React.createElement(Button, { size: "small", onClick: onPrimaryButtonClick }, t("PluginSettingsPanel_DiscardModal_PrimaryButton_Text")))
    }
  );
  const DesktopLayout = () => /* @__PURE__ */ React.createElement(
    MessageModalLayout,
    {
      dataHook: PLUGIN_SETTINGS_PANEL_DISCARD_MODAL,
      onCloseButtonClick,
      primaryButtonOnClick: onPrimaryButtonClick,
      secondaryButtonOnClick: onCloseButtonClick,
      primaryButtonText: t("PluginSettingsPanel_DiscardModal_PrimaryButton_Text"),
      secondaryButtonText: t("PluginSettingsPanel_DiscardModal_SecondaryButton_Text"),
      title: t("PluginSettingsPanel_DiscardModal_Title"),
      content: /* @__PURE__ */ React.createElement(Text, null, t("PluginSettingsPanel_DiscardModal_Content"))
    }
  );
  return /* @__PURE__ */ React.createElement(
    WixDesignSystemProvider,
    {
      features: { newColorsBranding: true },
      className: classes.modal_container
    },
    isMobile ? /* @__PURE__ */ React.createElement(MobileLayout, null) : /* @__PURE__ */ React.createElement(DesktopLayout, null)
  );
};
export {
  SettingsPanelDiscardModal
};
//# sourceMappingURL=settings-panel-discard-modal.js.map
