import React from "react";
import { DevContext } from "./../../ricos-context/index.js";
import { AppEmbedData_AppType } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { RequestServiceProvider } from "./../../_shared/request-service-provider/request-service-provider.js";
import { createRicosComponentStory } from "./../../wix-rich-content-common/create-ricos-component-story.js";
import { pluginVerticalEmbed } from "../index.js";
import { mockVerticalEmbedDataMap } from "../mocks/vertical-embed-util.js";
import { InsertModal } from "./insert-modal.js";
const Component = InsertModal;
const template = (params) => (storyProps) => {
  const items = mockVerticalEmbedDataMap[params.type.toLowerCase()];
  return createRicosComponentStory({
    component: /* @__PURE__ */ React.createElement(
      DevContext.Provider,
      {
        value: {
          fetchVerticalEmbedItemsFromDevContext: () => Promise.resolve(params?.emptyResults ? [] : items),
          fetchVerticalEmbedItemFromDevContext: () => Promise.resolve(params?.emptyResults ? void 0 : items[0])
        }
      },
      /* @__PURE__ */ React.createElement(RequestServiceProvider, null, /* @__PURE__ */ React.createElement(Component, { componentData: { type: params.type }, modalId: "" }))
    ),
    editorProps: {
      plugins: [pluginVerticalEmbed()]
    },
    storyProps
  });
};
const BookingsLiveSite = template({ type: AppEmbedData_AppType.BOOKING });
BookingsLiveSite.args = {
  environment: "liveSite"
};
const BookingsBM = template({ type: AppEmbedData_AppType.BOOKING });
BookingsBM.args = {
  environment: "businessManager"
};
const BookingsSelectedItemBM = template({
  type: AppEmbedData_AppType.BOOKING,
  isItemSelected: true
});
BookingsSelectedItemBM.args = {
  environment: "businessManager"
};
const BookingsSelectedItemLiveSite = template({
  type: AppEmbedData_AppType.BOOKING,
  isItemSelected: true
});
BookingsSelectedItemLiveSite.args = {
  environment: "liveSite"
};
const BookingsLiveSiteMobile = template({ type: AppEmbedData_AppType.BOOKING });
BookingsLiveSiteMobile.args = {
  environment: "liveSite",
  isMobile: true
};
const BookingsBMMobile = template({ type: AppEmbedData_AppType.BOOKING });
BookingsBMMobile.args = {
  environment: "businessManager",
  isMobile: true
};
const Events = template({ type: AppEmbedData_AppType.EVENT });
const EventsMobile = template({ type: AppEmbedData_AppType.EVENT });
EventsMobile.args = {
  isMobile: true
};
const Products = template({ type: AppEmbedData_AppType.PRODUCT });
const ProductsMobile = template({ type: AppEmbedData_AppType.PRODUCT });
ProductsMobile.args = {
  isMobile: true
};
const ProductsBMEmpty = template({ type: AppEmbedData_AppType.PRODUCT, emptyResults: true });
ProductsBMEmpty.args = {
  environment: "businessManager"
};
var insert_modal_stories_default = {
  name: "VerticalEmbedPlugin/InsertModal"
};
export {
  BookingsBM,
  BookingsBMMobile,
  BookingsLiveSite,
  BookingsLiveSiteMobile,
  BookingsSelectedItemBM,
  BookingsSelectedItemLiveSite,
  Events,
  EventsMobile,
  Products,
  ProductsBMEmpty,
  ProductsMobile,
  insert_modal_stories_default as default
};
//# sourceMappingURL=insert-modal.stories.js.map
