import { AppEmbedData_AppType, Node_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { isDefined } from "./utils.js";
const verticalEmbed = (...args) => {
  const appEmbedData = args.find(
    (a) => a?.type === AppEmbedData_AppType.BOOKING || a?.type === AppEmbedData_AppType.EVENT || a?.type === AppEmbedData_AppType.PRODUCT
  );
  return {
    type: "block_node",
    // @ts-expect-error
    node: (getId) => {
      const nodes = args.map((arg) => "type" in arg && arg.type === "block_node" ? arg.node(getId) : void 0).filter(isDefined);
      return {
        id: getId(),
        type: Node_Type.APP_EMBED,
        ...nodes?.length && { nodes },
        appEmbedData: appEmbedData ? appEmbedData : void 0
      };
    }
  };
};
export {
  verticalEmbed
};
//# sourceMappingURL=vertical-embed.builder.js.map
