"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var settings_panel_discard_modal_exports = {};
__export(settings_panel_discard_modal_exports, {
  SettingsPanelDiscardModal: () => SettingsPanelDiscardModal
});
module.exports = __toCommonJS(settings_panel_discard_modal_exports);
var import_design_system = require("@wix/design-system");
var import_react = __toESM(require("react"));
var import_ricos_context = require("./../../ricos-context/index.js");
var import_consts = require("./../settings-panel-discard-modal/consts.js");
var import_settings_panel_discard_modal_scss = __toESM(require("./settings-panel-discard-modal-scss.js"));
const SettingsPanelDiscardModal = ({
  closeModal
}) => {
  const { t, isMobile } = (0, import_react.useContext)(import_ricos_context.RicosContext);
  const onCloseButtonClick = () => closeModal({ confirmed: false });
  const onPrimaryButtonClick = () => closeModal({ confirmed: true });
  const MobileLayout = () => /* @__PURE__ */ import_react.default.createElement(
    import_design_system.ModalMobileLayout,
    {
      dataHook: import_consts.PLUGIN_SETTINGS_PANEL_DISCARD_MODAL,
      onCloseButtonClick,
      title: /* @__PURE__ */ import_react.default.createElement(import_design_system.Heading, { size: "medium" }, t("PluginSettingsPanel_DiscardModal_Title")),
      content: /* @__PURE__ */ import_react.default.createElement(import_design_system.Text, { size: "medium" }, t("PluginSettingsPanel_DiscardModal_Content")),
      footer: /* @__PURE__ */ import_react.default.createElement(import_design_system.Box, { align: "right" }, /* @__PURE__ */ import_react.default.createElement(import_design_system.Box, { marginRight: "12px" }, /* @__PURE__ */ import_react.default.createElement(import_design_system.Button, { priority: "secondary", size: "small", onClick: onCloseButtonClick }, t("PluginSettingsPanel_DiscardModal_SecondaryButton_Text"))), /* @__PURE__ */ import_react.default.createElement(import_design_system.Button, { size: "small", onClick: onPrimaryButtonClick }, t("PluginSettingsPanel_DiscardModal_PrimaryButton_Text")))
    }
  );
  const DesktopLayout = () => /* @__PURE__ */ import_react.default.createElement(
    import_design_system.MessageModalLayout,
    {
      dataHook: import_consts.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__ */ import_react.default.createElement(import_design_system.Text, null, t("PluginSettingsPanel_DiscardModal_Content"))
    }
  );
  return /* @__PURE__ */ import_react.default.createElement(
    import_design_system.WixDesignSystemProvider,
    {
      features: { newColorsBranding: true },
      className: import_settings_panel_discard_modal_scss.default.modal_container
    },
    isMobile ? /* @__PURE__ */ import_react.default.createElement(MobileLayout, null) : /* @__PURE__ */ import_react.default.createElement(DesktopLayout, null)
  );
};
//# sourceMappingURL=settings-panel-discard-modal.js.map
