import type { IMap, TPointDefaults, TClusterDefaults, } from "./types"; import type { IComponentBaseProps } from "../../../types/components"; const apiDefaults = { load: [ "templateLayoutFactory", "util.defineClass", "geoObject.addon.balloon", "geoObject.addon.hint", "Balloon", "Map" ], key: "", }; const optionsDefaults = { minZoom: 7, maxZoom: 23, suppressMapOpenBlock: true, yandexMapDisablePoiInteractivity: true, }; const userPropsDefaults = { isAllPointsVisible: true, }; const pointDefaults: TPointDefaults = { render: { icon: { extraClasses: {}, getLayout: null, }, balloon: { extraClasses: {}, getLayout: null, }, hint: { extraClasses: {}, getLayout: null, }, }, options: {}, state: { isDisabled: false, isActive: false, isHasInteraction: true, }, meta: { balloon: { title: "", description: "", }, hint: { title: "", description: "", }, pane: { title: "", description: "", }, }, icon: { src: { default: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MCA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDM5SDI0TDIwIDQ3TDE2IDM5WiIgZmlsbD0iI0JCQzFENSIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIyMCIgZmlsbD0iIzkwOUFCRCIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI0IiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K", disabled: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MCA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDM5SDI0TDIwIDQ3TDE2IDM5WiIgZmlsbD0iI0JCQzFENSIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIyMCIgZmlsbD0iIzkwOUFCRCIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI0IiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K", active: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MCA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDM5SDI0TDIwIDQ3TDE2IDM5WiIgZmlsbD0iIzFDNkNENSIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIyMCIgZmlsbD0iIzFDNkNENSIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI0IiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K", hover: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDciIHZpZXdCb3g9IjAgMCA0MCA0NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDM5SDI0TDIwIDQ3TDE2IDM5WiIgZmlsbD0iI0JCQzFENSIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIyMCIgZmlsbD0iIzkwOUFCRCIvPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI0IiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K", }, size: [ 40, 48 ], }, }; const clusterDefaults: TClusterDefaults = { options: { groupByCoordinates: false, }, }; const mapDefaults: IMap & IComponentBaseProps = { id: "", onMount: null, onUnmount: null, placeholderSlot: null, extraClasses: {}, extraAttrs: {}, points: [], clusters: [], onReady: null, onError: null, onAction: null, baseClass: "yaMap" as const, zoom: 12, maxActivePoints: 1, isAsync: true, center: [ 55.751244, 37.618423 ] as const, // Moscow, margin: [ 40, 40, 40, 40 ] as const, modules: {}, panelSlot: null, options: optionsDefaults, isDisabled: false, api: apiDefaults, pointOptions: pointDefaults, clusterOptions: clusterDefaults, isAllPointsVisible: userPropsDefaults.isAllPointsVisible, }; export { apiDefaults, clusterDefaults, mapDefaults, optionsDefaults, pointDefaults, userPropsDefaults, };