"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_modal_stories_exports = {};
__export(settings_modal_stories_exports, {
  DesignBusinessManager: () => DesignBusinessManager,
  DesignBusinessManagerMobile: () => DesignBusinessManagerMobile,
  DesignLiveSite: () => DesignLiveSite,
  DesignLiveSiteMobile: () => DesignLiveSiteMobile,
  LayoutBusinessManager: () => LayoutBusinessManager,
  LayoutBusinessManagerMobile: () => LayoutBusinessManagerMobile,
  LayoutLiveSite: () => LayoutLiveSite,
  LayoutLiveSiteMobile: () => LayoutLiveSiteMobile,
  SettingsBusinessManager: () => SettingsBusinessManager,
  SettingsBusinessManagerMobile: () => SettingsBusinessManagerMobile,
  SettingsLiveSite: () => SettingsLiveSite,
  SettingsLiveSiteMobile: () => SettingsLiveSiteMobile,
  SettingsWithViewSettingDisabledBM: () => SettingsWithViewSettingDisabledBM,
  default: () => settings_modal_stories_default
});
module.exports = __toCommonJS(settings_modal_stories_exports);
var import_react = __toESM(require("react"));
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__ = require("../../index.js");
var import_settings_modal = require("./settings-modal.js");
const Component = import_settings_modal.SettingsModal;
const pollData = {
  containerData: {
    width: {
      size: import_next_schema.PluginContainerData_Width_Type.CONTENT
    },
    alignment: import_next_schema.PluginContainerData_Alignment.CENTER,
    textWrap: true
  },
  poll: {
    title: "",
    image: {
      src: {
        url: "https://static.wixstatic.com/media/436483e6ed9e41fe91b9f286d2ea4efb.jpg"
      }
    },
    options: [
      {
        title: "",
        image: {
          src: {
            url: "https://static.wixstatic.com/media/3a27828e768344158489df4f2c03cfb2.jpg"
          }
        }
      },
      {
        title: "",
        image: {
          src: {
            url: "https://static.wixstatic.com/media/fb62d9f8e7824b2e90b13b971e700b92.jpg"
          }
        }
      }
    ],
    settings: {
      permissions: {
        view: import_next_schema.PollData_Poll_Settings_Permissions_ViewRole.VOTERS,
        vote: import_next_schema.PollData_Poll_Settings_Permissions_VoteRole.ALL,
        allowMultipleVotes: false
      },
      showVoters: false,
      showVotesCount: true
    }
  },
  layout: {
    poll: {
      type: import_next_schema.PollData_Layout_PollLayout_Type.LIST,
      direction: import_next_schema.PollData_Layout_PollLayout_Direction.LTR,
      enableImage: false
    },
    options: {
      enableImage: false
    }
  },
  design: {
    poll: {
      background: {
        type: import_next_schema.PollData_Design_PollDesign_Background_Type.IMAGE,
        image: {
          src: {
            url: "https://static.wixstatic.com/media/2dfdd3_1977932e94064f168abaaa2c04b678a5~mv2.jpg"
          }
        }
      },
      borderRadius: 0
    },
    options: {
      borderRadius: 0
    }
  }
};
const template = ({
  activeTab,
  showVoteRoleSetting
}) => (storyProps) => {
  return (0, import_create_ricos_component_story.createRicosComponentStory)({
    component: /* @__PURE__ */ import_react.default.createElement(
      Component,
      {
        nodeId: "",
        modalId: "",
        activeTab,
        config: {
          type: "poll",
          showVoteRoleSetting: showVoteRoleSetting === void 0 ? true : showVoteRoleSetting
        }
      }
    ),
    pmNodeAttrs: pollData,
    editorProps: {
      plugins: [(0, import__.pluginPoll)()]
    },
    storyProps
  });
};
const LayoutLiveSite = template({ activeTab: "layout" });
LayoutLiveSite.args = {
  environment: "liveSite"
};
const LayoutLiveSiteMobile = template({ activeTab: "layout" });
LayoutLiveSiteMobile.args = {
  isMobile: true,
  environment: "liveSite"
};
const LayoutBusinessManager = template({ activeTab: "layout" });
LayoutBusinessManager.args = {
  environment: "businessManager"
};
const LayoutBusinessManagerMobile = template({ activeTab: "layout" });
LayoutBusinessManagerMobile.args = {
  environment: "businessManager",
  isMobile: true
};
const DesignLiveSite = template({ activeTab: "design" });
DesignLiveSite.args = {
  environment: "liveSite"
};
const DesignLiveSiteMobile = template({ activeTab: "design" });
DesignLiveSiteMobile.args = {
  isMobile: true,
  environment: "liveSite"
};
const DesignBusinessManager = template({ activeTab: "design" });
DesignBusinessManager.args = {
  environment: "businessManager"
};
const DesignBusinessManagerMobile = template({ activeTab: "design" });
DesignBusinessManagerMobile.args = {
  environment: "businessManager",
  isMobile: true
};
const SettingsLiveSite = template({ activeTab: "settings" });
SettingsLiveSite.args = {
  environment: "liveSite"
};
const SettingsLiveSiteMobile = template({ activeTab: "settings" });
SettingsLiveSiteMobile.args = {
  isMobile: true,
  environment: "liveSite"
};
const SettingsBusinessManager = template({ activeTab: "settings" });
SettingsBusinessManager.args = {
  environment: "businessManager"
};
const SettingsWithViewSettingDisabledBM = template({
  activeTab: "settings",
  showVoteRoleSetting: false
});
SettingsWithViewSettingDisabledBM.args = {
  environment: "businessManager"
};
const SettingsBusinessManagerMobile = template({ activeTab: "settings" });
SettingsBusinessManagerMobile.args = {
  environment: "businessManager",
  isMobile: true
};
var settings_modal_stories_default = {
  name: "PollsPlugin/SettingsModal"
};
//# sourceMappingURL=settings-modal.stories.js.map
