import React from "react";
import {
  GalleryOptions_ItemStyle_Crop,
  GalleryOptions_Layout_Orientation,
  GalleryOptions_Layout_Type,
  GalleryOptions_Thumbnails_Alignment,
  PluginContainerData_Alignment,
  PluginContainerData_Width_Type
} from "./../../../ricos-schema/next-schema/index.js";
import {
  action,
  createRicosComponentStory
} from "./../../../wix-rich-content-common/create-ricos-component-story.js";
import { pluginSpoiler } from "./../../../plugin-spoiler/index.js";
import { pluginGallery } from "../../index.js";
import { GallerySettingsModal } from "./gallery-settings-modal.js";
const componentData = {
  containerData: {
    width: {
      size: PluginContainerData_Width_Type.CONTENT
    },
    alignment: PluginContainerData_Alignment.CENTER,
    spoiler: {
      enabled: false
    },
    height: {},
    textWrap: true
  },
  items: [
    {
      image: {
        media: {
          src: {
            url: "8bb438_f8233d1de49442169c3bd47e3dce2780.jpg"
          },
          width: 5600,
          height: 3737
        }
      }
    },
    {
      image: {
        media: {
          src: {
            url: "8bb438_2e22ca8b422e44c5a6fb723392a747b5.jpg"
          },
          width: 5600,
          height: 3727
        }
      }
    },
    {
      image: {
        media: {
          src: {
            url: "8bb438_923730e8751f42aa9f75de92bd4ae77c.jpg"
          },
          width: 1920,
          height: 1280
        }
      }
    },
    {
      image: {
        media: {
          src: {
            url: "8bb438_144de0d90d5d4476829c870a38ad8151.jpg"
          },
          width: 3720,
          height: 5580
        }
      }
    }
  ],
  options: {
    layout: {
      type: GalleryOptions_Layout_Type.GRID,
      horizontalScroll: false,
      orientation: GalleryOptions_Layout_Orientation.COLUMNS,
      numberOfColumns: 3
    },
    item: {
      ratio: 1,
      crop: GalleryOptions_ItemStyle_Crop.FILL
    },
    thumbnails: {
      placement: GalleryOptions_Thumbnails_Alignment.NONE
    }
  }
};
const template = (params = {
  withSpoiler: false,
  activeTab: "design",
  isImageSettingsOpened: false
}) => (storyProps) => {
  const state = params.isImageSettingsOpened ? {
    tab: "design",
    isImageSettingsOpened: true,
    selectedItemIndexes: [0]
  } : void 0;
  return createRicosComponentStory({
    component: /* @__PURE__ */ React.createElement(
      GallerySettingsModal,
      {
        onFileSelect: action("onFileSelect"),
        activeTab: params.activeTab,
        accept: "image/*",
        nodeId: "",
        _state: state,
        modalId: ""
      }
    ),
    pmNodeAttrs: componentData,
    editorProps: {
      plugins: [pluginGallery(), ...params.withSpoiler ? [pluginSpoiler()] : []]
    },
    storyProps
  });
};
const Settings = template({ withSpoiler: false, activeTab: "settings" });
const SettingsWithSpoiler = template({ withSpoiler: true, activeTab: "settings" });
const SettingsWithSpoilerBM = template({ withSpoiler: true, activeTab: "settings" });
SettingsWithSpoilerBM.args = {
  environment: "businessManager"
};
const SettingsWithSpoilerMobile = template({ withSpoiler: true, activeTab: "settings" });
SettingsWithSpoilerMobile.args = {
  isMobile: true
};
const Layout = template({ activeTab: "layout" });
const LayoutBM = template({ activeTab: "layout" });
LayoutBM.args = {
  environment: "businessManager"
};
const LayoutMobile = template({ activeTab: "layout" });
LayoutMobile.args = {
  isMobile: true
};
const MediaList = template({ activeTab: "design" });
const MediaListBM = template({ activeTab: "design" });
MediaListBM.args = {
  environment: "businessManager"
};
const MediaListMobile = template({ activeTab: "design" });
MediaListMobile.args = {
  isMobile: true
};
const SingleMediaSettingsBM = template({ activeTab: "design", isImageSettingsOpened: true });
SingleMediaSettingsBM.args = {
  environment: "businessManager"
};
const SingleMediaSettingsLiveSite = template({
  activeTab: "design",
  isImageSettingsOpened: true
});
SingleMediaSettingsLiveSite.args = {
  environment: "liveSite"
};
const SingleMediaSettingsBMMobile = template({
  activeTab: "design",
  isImageSettingsOpened: true
});
SingleMediaSettingsBMMobile.args = {
  environment: "businessManager",
  isMobile: true
};
const SingleMediaSettingsLiveSiteMobile = template({
  activeTab: "design",
  isImageSettingsOpened: true
});
SingleMediaSettingsLiveSiteMobile.args = {
  environment: "liveSite",
  isMobile: true
};
var gallery_settings_modal_stories_default = {
  name: "GalleryPlugin/SettingsModal"
};
export {
  Layout,
  LayoutBM,
  LayoutMobile,
  MediaList,
  MediaListBM,
  MediaListMobile,
  Settings,
  SettingsWithSpoiler,
  SettingsWithSpoilerBM,
  SettingsWithSpoilerMobile,
  SingleMediaSettingsBM,
  SingleMediaSettingsBMMobile,
  SingleMediaSettingsLiveSite,
  SingleMediaSettingsLiveSiteMobile,
  gallery_settings_modal_stories_default as default
};
//# sourceMappingURL=gallery-settings-modal.stories.js.map
