"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 button_link_settings_stories_exports = {};
__export(button_link_settings_stories_exports, {
  DesignBM: () => DesignBM,
  DesignBMMobile: () => DesignBMMobile,
  DesignLiveSite: () => DesignLiveSite,
  DesignLiveSiteMobile: () => DesignLiveSiteMobile,
  SettingsBM: () => SettingsBM,
  SettingsBMMobile: () => SettingsBMMobile,
  SettingsLiveSite: () => SettingsLiveSite,
  SettingsLiveSiteMobile: () => SettingsLiveSiteMobile,
  default: () => button_link_settings_stories_default
});
module.exports = __toCommonJS(button_link_settings_stories_exports);
var import_react = __toESM(require("react"));
var import_ricos_content = require("./../../ricos-content/index.js");
var import_next_schema = require("./../../ricos-schema/next-schema/index.js");
var import_create_ricos_component_story = require("./../../wix-rich-content-common/create-ricos-component-story.js");
var import_constants = require("../constants.js");
var import__ = require("../index.js");
var import_settings_modal = require("./settings-modal.js");
const NODE_ID = "z3vig3";
const componentData = {
  containerData: {
    width: {
      size: import_next_schema.PluginContainerData_Width_Type.CONTENT
    },
    alignment: import_next_schema.PluginContainerData_Alignment.CENTER,
    spoiler: {
      enabled: false
    },
    height: {},
    textWrap: true
  },
  text: "Click Me",
  styles: {
    buttonSize: "SMALL",
    backgroundColor: "#0000FF40",
    backgroundColorHover: "#00FF00",
    textColor: "#FF000020",
    textColorHover: "#FF00FF",
    borderColor: "#00FFFF",
    borderColorHover: "#FFFF00",
    borderWidth: 12,
    borderRadius: 20
  },
  type: import_next_schema.ButtonData_Type.LINK
};
const template = (params = {}) => (storyProps) => {
  const editor = {
    getPublicCommands: () => ({
      getBlockComponentData: () => componentData,
      setBlock: () => {
      }
    }),
    adapter: {
      tiptapEditor: {
        chain: () => ({
          setHoverPreview: () => ({
            run: () => {
            }
          })
        }),
        view: {
          dom: {
            querySelector: () => null
          }
        }
      }
    }
  };
  return (0, import_create_ricos_component_story.createRicosComponentStory)({
    component: /* @__PURE__ */ import_react.default.createElement(
      import_settings_modal.ButtonSettingsModal,
      {
        nodeId: NODE_ID,
        modalId: "",
        settings: params.config ?? {},
        type: import_ricos_content.LINK_BUTTON_TYPE,
        activeTab: params.activeTab ?? import_constants.SETTINGS_TAB.SETTINGS
      }
    ),
    siblingComponent: /* @__PURE__ */ import_react.default.createElement("div", { "data-hook": `editor-${NODE_ID}` }, /* @__PURE__ */ import_react.default.createElement("div", { "data-hook": "buttonViewer" })),
    mock: { editor },
    editorProps: {
      plugins: [(0, import__.pluginLinkButton)()]
    },
    pmNodeAttrs: componentData,
    storyProps
  });
};
const SettingsLiveSite = template();
SettingsLiveSite.args = {
  environment: "liveSite"
};
const SettingsBM = template();
SettingsBM.args = {
  environment: "businessManager"
};
const SettingsLiveSiteMobile = template();
SettingsLiveSiteMobile.args = {
  isMobile: true,
  environment: "liveSite"
};
const SettingsBMMobile = template();
SettingsBMMobile.args = {
  isMobile: true,
  environment: "businessManager"
};
const DesignLiveSite = template({ activeTab: "DESIGN" });
DesignLiveSite.args = {
  environment: "liveSite"
};
const DesignBM = template({ activeTab: "DESIGN" });
DesignBM.args = {
  environment: "businessManager"
};
const DesignLiveSiteMobile = template({ activeTab: "DESIGN" });
DesignLiveSiteMobile.args = {
  isMobile: true,
  environment: "liveSite"
};
const DesignBMMobile = template({ activeTab: "DESIGN" });
DesignBMMobile.args = {
  isMobile: true,
  environment: "businessManager"
};
var button_link_settings_stories_default = {
  name: "ButtonLinkPlugin/SettingsModal"
};
//# sourceMappingURL=button-link-settings.stories.js.map
