"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Default = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const maps_1 = require("../../.storybook/maps.js");
const utils_1 = require("../../.storybook/utils.js");
const PageConstructor_1 = require("../containers/PageConstructor/index.js");
const mapsContext_1 = require("../gravity-blocks/context/mapsContext/mapsContext.js");
const mapsProvider_1 = require("../gravity-blocks/context/mapsContext/mapsProvider.js");
const extensions_1 = require("../gravity-blocks/extensions/index.js");
const CustomButton_1 = require("../gravity-blocks/navigation/__stories__/CustomButton/CustomButton.js");
const data_json_1 = tslib_1.__importDefault(require("../blocks/FilterBlock/__stories__/data.json"));
const data_json_2 = tslib_1.__importDefault(require("../blocks/Form/__stories__/data.json"));
const data_json_3 = tslib_1.__importDefault(require("../blocks/Icons/__stories__/data.json"));
const data_json_4 = tslib_1.__importDefault(require("../blocks/Map/__stories__/data.json"));
const data_json_5 = tslib_1.__importDefault(require("../blocks/Share/__stories__/data.json"));
const data_json_6 = tslib_1.__importDefault(require("../gravity-blocks/navigation/__stories__/data.json"));
exports.default = {
    title: 'Lab/Tokenization/Blocks/InteractiveAndForms',
    component: PageConstructor_1.PageConstructor,
};
const Template = ({ navigation, custom = {}, }) => ((0, jsx_runtime_1.jsx)(PageConstructor_1.PageConstructorProvider, { children: (0, jsx_runtime_1.jsx)(mapsProvider_1.MapProvider, { scriptSrc: maps_1.scriptsSrc[mapsContext_1.MapType.Yandex], apiKey: maps_1.ymapApiKeyForStorybook, type: mapsContext_1.MapType.Yandex, children: (0, jsx_runtime_1.jsx)(PageConstructor_1.PageConstructor, { extensions: (0, extensions_1.gravityBlocksExtension)({
                globalDefaults: {
                    navigation,
                },
            }), custom: custom, content: {
                blocks: [
                    // form-block: hubspot form
                    (0, utils_1.blockTransform)(data_json_2.default.default),
                    // form-block: with background color
                    (0, utils_1.blockTransform)({ ...data_json_2.default.default, ...data_json_2.default.withBackground }),
                    // form-block: with background image
                    (0, utils_1.blockTransform)({
                        ...data_json_2.default.default,
                        ...data_json_2.default.withBackgroundImage,
                    }),
                    // form-block: yandex form
                    (0, utils_1.blockTransform)(data_json_2.default.yandexForm),
                    // filter-block: with tag filtering and layout items
                    (0, utils_1.blockTransform)(data_json_1.default.default),
                    // icons-block: minimal (no title)
                    (0, utils_1.blockTransform)(data_json_3.default.default.content),
                    // icons-block: with title and description
                    (0, utils_1.blockTransform)(data_json_3.default.withDescription.content),
                    // share-block: default (no title)
                    (0, utils_1.blockTransform)(data_json_5.default.default.content),
                    // share-block: with custom title
                    (0, utils_1.blockTransform)(data_json_5.default.customTitle.content),
                    // map-block: default with yandex map
                    (0, utils_1.blockTransform)({
                        type: 'map-block',
                        title: data_json_4.default.common.title,
                        description: data_json_4.default.common.description,
                        map: data_json_4.default.ymap,
                    }),
                    // map-block: with additional info and links
                    (0, utils_1.blockTransform)({
                        type: 'map-block',
                        title: data_json_4.default.common.title,
                        description: data_json_4.default.common.description,
                        additionalInfo: data_json_4.default.common.additionalInfo,
                        links: data_json_4.default.common.links,
                        map: { ...data_json_4.default.ymap, id: 'common-places-2' },
                    }),
                    // map-block: with buttons
                    (0, utils_1.blockTransform)({
                        type: 'map-block',
                        title: data_json_4.default.common.title,
                        description: data_json_4.default.common.description,
                        buttons: data_json_4.default.common.buttons,
                        map: { ...data_json_4.default.ymap, id: 'common-places-3' },
                    }),
                ],
            } }) }) }));
exports.Default = Template.bind({});
exports.Default.args = {
    custom: {
        navigation: {
            'custom-item': CustomButton_1.CustomButton,
        },
    },
    navigation: {
        ...data_json_6.default.navigation,
        header: {
            ...data_json_6.default.navigation.header,
            customMobileHeaderItems: [{ type: 'custom-item' }],
        },
    },
};
//# sourceMappingURL=InteractiveAndForms.stories.js.map
