{"version":3,"sources":["../src/components/AddElementDialog.tsx","../src/utils/templates/containers/XStack/template1.ts","../src/utils/templates/containers/XStack/template2.ts","../src/utils/templates/containers/XStack/index.ts","../src/utils/templates/elements/XBreadcrumb/index.ts","../src/utils/templates/elements/XButton/index.ts","../src/utils/templates/elements/XForm/index.ts","../src/utils/templates/elements/XIcon/index.ts","../src/utils/templates/elements/XImage/index.ts","../src/utils/templates/elements/XMap/index.ts","../src/utils/templates/elements/XRating/index.ts","../src/utils/templates/elements/XText/index.ts","../src/utils/templates/containers/XProductDetails/template1.ts","../src/utils/templates/containers/XProductDetails/template2.ts","../src/utils/templates/containers/XProductDetails/index.ts","../src/utils/templates/containers/XCategoryFilter/template1.ts","../src/utils/templates/containers/XCategoryFilter/index.ts","../src/utils/templates/containers/XGrid/col2.ts","../src/utils/templates/containers/XGrid/col3.ts","../src/utils/templates/containers/XGrid/col4.ts","../src/utils/templates/containers/XGrid/index.ts","../src/utils/templates/containers/XCarousel/template1.ts","../src/utils/templates/containers/XCarousel/index.ts","../src/utils/templates/index.ts"],"names":["Close","ExtensionRounded","FavoriteRounded","LayersRounded","WebRounded","Button","Dialog","DialogTitle","Grid","Tab","Tabs","Typography","alpha","Stack","IconButton","_","nanoid","React","useRecoilState","useResetRecoilState","X_STACK_TEMPLATE1","X_STACK_TEMPLATE2","X_STACK_TEMPLATES","X_BREADCRUMB_TEMPLATES","X_BUTTON_TEMPLATES","MAIN_COLOR","X_FORM_TEMPLATES","X_ICON_TEMPLATES","X_IMAGE_TEMPLATES","X_MAP_TEMPLATES","X_RATING_TEMPLATES","X_TEXT_TEMPLATES","X_PRODUCT_DETAILS_TEMPLATE1","X_PRODUCT_DETAILS_TEMPLATE2","X_PRODUCT_DETAILS_TEMPLATES","X_CATEGORY_FILTER_TEMPLATE1","X_CATEGORY_FILTER_TEMPLATES","X_GRID_COL_2","X_GRID_COL_3","X_GRID_COL_4","X_GRID_TEMPLATES","X_CAROUSEL_TEMPLATE_1","X_CAROUSEL_TEMPLATES","TEMPLATES","AddElementDialog","setOpen","isSelf","saveData","useSaveData","selectedMainTab","setSelectedMainTab","setXPage","xPage","useXPage","selectedElement","setSelectedElement","SELECTED_ELEMENT","xChildren","setXChildren","useXCommonChildren","reset","USE_X_ELEMENT","elements","COMPONENT_CHILDREN","updateElement","template","localIndex","prefix","isCommon","reference","positionInPage","section","localTemplate","el","config","old","_newPage","value","SubTab","AddElementDialog_default","selectedSubTab","setSelectedSubTab","templates","element","COMPONENT_READABLE_NAME","templateName","TemplatePreview"],"mappings":"wSAAA,OACE,SAAAA,GACA,oBAAAC,GACA,mBAAAC,GACA,iBAAAC,GACA,cAAAC,OACK,sBACP,OACE,UAAAC,GACA,UAAAC,GACA,eAAAC,GACA,QAAAC,EACA,OAAAC,EACA,QAAAC,GACA,cAAAC,GACA,SAAAC,EACA,SAAAC,EACA,cAAAC,OACK,gBACP,OAAOC,OAAO,SACd,OAAS,UAAAC,OAAc,SACvB,UAAYC,MAAW,QACvB,OAAS,kBAAAC,GAAgB,uBAAAC,OAA2B,SCpB7C,IAAMC,EAAqC,CAChD,yBAAuB,CACrB,SAAU,CACR,CACE,KAAM,SACN,OAAQ,CAAE,MAAO,MAAO,EACxB,MAAO,CACL,IAAK,CAAC,CACR,CACF,CACF,CACF,CACF,ECZO,IAAMC,EAAqC,CAChD,gBAAc,CACZ,MACE,qLACF,SAAU,CACR,CACE,KAAM,SACN,OAAQ,CAAE,MAAO,MAAO,EACxB,MAAO,CACL,IAAK,CACH,eAAgB,SAChB,cAAe,SACf,eAAgB,OAChB,OAAQ,QACR,QAAS,YACT,gBACE,gKACF,QAAS,CACP,IAAK,OACL,MAAO,OACP,KAAM,OACN,OAAQ,MACV,CACF,CACF,CACF,EACA,CACE,KAAM,QACN,OAAQ,CAAE,MAAO,OAAQ,QAAS,MAAO,EACzC,MAAO,CACL,IAAK,CACH,WAAY,UACZ,SAAU,OACV,cAAe,MACf,KAAM,iBACN,MAAO,SACT,CACF,CACF,EACA,CACE,KA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B,EAAcmB,EAAQ,QAAQ,GAC1D,SAED,CAIF,EACA,gBAACxE,GAAA,CACC,GAAI,CAIF,OAAQ,GACR,GAAI,EACJ,GAAI,EACJ,SAAU,GACV,QAAS,UACT,MAAO,OACP,WAAY,IACZ,cAAe,EACjB,GAEC0E,CACH,CACF","sourcesContent":["import {\n  Close,\n  ExtensionRounded,\n  FavoriteRounded,\n  LayersRounded,\n  WebRounded,\n} from \"@mui/icons-material\";\nimport {\n  Button,\n  Dialog,\n  DialogTitle,\n  Grid,\n  Tab,\n  Tabs,\n  Typography,\n  alpha,\n  Stack,\n  IconButton,\n} from \"@mui/material\";\nimport _ from \"lodash\";\nimport { nanoid } from \"nanoid\";\nimport * as React from \"react\";\nimport { useRecoilState, useResetRecoilState } from \"recoil\";\nimport { useSaveData } from \"../hooks/useSaveData\";\nimport { SELECTED_ELEMENT } from \"../hooks/useSelectedElement\";\nimport { isCommon, useXCommonChildren } from \"../hooks/useXCommon\";\nimport { USE_X_ELEMENT } from \"../hooks/useXElement\";\nimport { useXPage } from \"../hooks/useXPage\";\nimport { COMPONENT_READABLE_NAME } from \"../utils/constants/common/componentName\";\nimport { COMPONENT_CHILDREN } from \"../utils/constants/gui/componentChildren\";\nimport { XElementConfig } from \"../utils/interfaces/Elements/XElement.interfaces\";\nimport { TEMPLATES } from \"../utils/templates\";\nimport {\n  TComponentName,\n  TComponentType,\n} from \"../utils/types/common/components.types\";\nimport { TTemplate } from \"../utils/types/common/templates.types\";\n\ninterface AddElementDialogProps {\n  setOpen: (open: boolean) => void;\n  isSelf?: boolean;\n}\n\nconst AddElementDialog: React.FC<AddElementDialogProps> = ({\n  setOpen,\n  isSelf = false,\n}) => {\n  const saveData = useSaveData();\n\n  const [selectedMainTab, setSelectedMainTab] = React.useState<number>(0);\n\n  // FOR SETTING ELEMENT ON THE MAIN PAGE\n  const { setXPage, xPage } = useXPage();\n\n  // TODO IMPLEMENT FOR SETTING ELEMENT ON THE HEADER\n\n  // FOR SETTING ELEMENT IN THE FOOTER\n\n  const [selectedElement, setSelectedElement] =\n    useRecoilState(SELECTED_ELEMENT);\n  const { xChildren, setXChildren } = useXCommonChildren(\n    selectedElement?.index ?? (\"\" as any)\n  );\n  const reset = useResetRecoilState(\n    USE_X_ELEMENT(selectedElement ? selectedElement.index : \"DEFAULT_ELEMENT\")\n  );\n\n  const elements = selectedElement\n    ? COMPONENT_CHILDREN[selectedElement.name]\n    : COMPONENT_CHILDREN.XPage;\n\n  const updateElement = async (template: TComponentType[]) => {\n    /**\n     * save the current pages data for safety\n     */\n    await saveData();\n\n    // UPDATING CURRENT ELEMENT TEMPLATE\n    const localIndex = nanoid(5);\n\n    let prefix = isCommon(selectedElement?.index ?? \"\")\n      ? selectedElement?.index\n      : \"\";\n\n    if (isSelf && selectedElement) {\n      if (template.length === 1) {\n        setSelectedElement({\n          ...selectedElement,\n          value: template[0].props,\n        });\n      } else {\n        let reference: TComponentType[] = isCommon(selectedElement.index)\n          ? xChildren\n          : (xPage as TComponentType[]);\n\n        const positionInPage = _.findIndex(reference, (section) => {\n          if (!section.config) return false;\n\n          return section.config.index === selectedElement.index;\n        });\n\n        const localTemplate: TComponentType[] = template.map((el) => {\n          const config: XElementConfig = {\n            ...el.config,\n            index:\n              prefix +\n              (el.config ? el.config.index + \"_\" + localIndex : localIndex),\n          };\n\n          if (config.childOf) {\n            config.childOf = prefix + (config.childOf + \"_\" + localIndex);\n          } else {\n            if (selectedElement.childOf) {\n              config.childOf = selectedElement.childOf;\n            }\n          }\n\n          return { ...el, config };\n        });\n\n        if (isCommon(selectedElement.index)) {\n          setXChildren((old) => {\n            const _newPage = [...old];\n\n            _newPage.splice(positionInPage, 1, ...localTemplate);\n\n            return _newPage;\n          });\n        } else {\n          setXPage((old) => {\n            const _newPage = [...(old as TComponentType[])];\n\n            _newPage.splice(positionInPage, 1, ...localTemplate);\n\n            return _newPage;\n          });\n        }\n\n        reset();\n      }\n    }\n    // ADDING CHILD ELEMENT\n    else {\n      const localTemplate: TComponentType[] = template.map((el) => {\n        const config: XElementConfig = {\n          ...el.config,\n          index:\n            prefix +\n            (el.config ? el.config.index + \"_\" + localIndex : localIndex),\n        };\n\n        if (config.childOf) {\n          config.childOf = prefix + (config.childOf + \"_\" + localIndex);\n        } else {\n          // IF IT IS NOT A PAGE ADD THIS TO THE CURRENT ELENENT\n          if (selectedElement) config.childOf = selectedElement.index;\n        }\n\n        return { ...el, config };\n      });\n\n      if (localTemplate.length > 0) {\n        if (selectedElement && isCommon(selectedElement.index)) {\n          setXChildren((old) => [...old, ...localTemplate]);\n        } else {\n          setXPage((old) => [...(old as TComponentType[]), ...localTemplate]);\n        }\n      }\n    }\n  };\n\n  return (\n    <Dialog\n      maxWidth=\"lg\"\n      open\n      fullWidth\n      onClose={() => setOpen(false)}\n      PaperProps={{\n        sx: {\n          bgcolor: \"#131519\",\n          color: \"white\",\n          borderRadius: 3,\n          height: \"70vh\",\n        },\n      }}\n      componentsProps={{\n        root: { style: { zIndex: 10000 } },\n      }}\n    >\n      <DialogTitle\n        sx={{\n          pb: isSelf ? 2 : 0,\n          pt: 2,\n          fontSize: 14,\n          fontWeight: 600,\n          textTransform: \"uppercase\",\n          letterSpacing: 1,\n          bgcolor: \"#1F212B\",\n          alignItems: \"center\",\n          display: \"flex\",\n        }}\n      >\n        <LayersRounded sx={{ mr: 2 }} />\n        <Typography component=\"span\" sx={{ flex: 1 }}>\n          Choisir un template\n        </Typography>\n        <IconButton color=\"error\" size=\"small\" onClick={() => setOpen(false)}>\n          <Close />\n        </IconButton>\n      </DialogTitle>\n      {!isSelf && (\n        <Tabs\n          sx={{\n            bgcolor: \"#1F212B\",\n            minHeight: 72,\n            \".MuiTab-root\": {\n              color: \"rgba(255,255,255,0.6)\",\n\n              \"&.Mui-selected\": {\n                color: \"secondary.main\",\n              },\n            },\n          }}\n          variant=\"fullWidth\"\n          value={selectedMainTab}\n          onChange={(_, value) => setSelectedMainTab(value)}\n          textColor=\"secondary\"\n          indicatorColor=\"secondary\"\n        >\n          <Tab\n            label=\"Composants\"\n            icon={<ExtensionRounded />}\n            iconPosition=\"start\"\n          />\n          {!selectedElement && (\n            <Tab\n              label=\"Pages\"\n              icon={<WebRounded />}\n              iconPosition=\"start\"\n              disabled\n            />\n          )}\n          <Tab\n            label=\"Sauvegardes\"\n            icon={<FavoriteRounded />}\n            iconPosition=\"start\"\n            disabled\n          />\n        </Tabs>\n      )}\n      <SubTab\n        elements={\n          isSelf && selectedElement ? [selectedElement.name] : elements ?? []\n        }\n        updateElement={updateElement}\n      />\n    </Dialog>\n  );\n};\n\nexport default AddElementDialog;\n\ninterface SubTabProps {\n  elements: TComponentName[];\n  updateElement: (template: TComponentType[]) => void;\n}\n\nconst SubTab: React.FC<SubTabProps> = ({ elements, updateElement }) => {\n  const [selectedSubTab, setSelectedSubTab] = React.useState<TComponentName>(\n    elements[0]\n  );\n\n  const templates: TTemplate = selectedSubTab\n    ? TEMPLATES[selectedSubTab] ?? {}\n    : {};\n\n  return (\n    <Grid container spacing={2} padding={2} height=\"calc(100% - 72px)\">\n      <Grid item width={200} sx={{ overflowY: \"scroll\", height: \"100%\" }}>\n        <Tabs\n          variant=\"scrollable\"\n          orientation=\"vertical\"\n          textColor=\"inherit\"\n          value={selectedSubTab}\n          onChange={(_, value) => setSelectedSubTab(value)}\n          sx={{\n            \".MuiTab-root\": {\n              minHeight: \"auto\",\n              fontSize: 12,\n              alignItems: \"flex-start\",\n\n              \"&.Mui-selected\": {\n                bgcolor: \"#1F212B\",\n              },\n            },\n          }}\n        >\n          {elements.map((element) => (\n            <Tab\n              key={element}\n              value={element}\n              label={COMPONENT_READABLE_NAME[element]}\n            />\n          ))}\n        </Tabs>\n      </Grid>\n      <Grid item xs sx={{ overflowY: \"scroll\", height: \"100%\" }}>\n        {Object.keys(templates).map((templateName) => (\n          <TemplatePreview\n            key={templateName}\n            element={templates[templateName] as any}\n            templateName={templateName}\n            updateElement={updateElement}\n          />\n        ))}\n      </Grid>\n    </Grid>\n  );\n};\n\nconst TemplatePreview: React.FC<{\n  element: { image?: string; template: TComponentType[] };\n  templateName: string;\n  updateElement: (template: TComponentType[]) => void | Promise<void>;\n}> = ({ element, templateName, updateElement }) => {\n  return (\n    <Stack\n      minHeight={150}\n      bgcolor=\"#1F212B\"\n      justifyContent=\"flex-end\"\n      position=\"relative\"\n      overflow=\"hidden\"\n      sx={{ \"&:not(:last-of-type)\": { mb: 2 }, border: \"5px solid #0D0E11\" }}\n    >\n      {element.image && (\n        <img\n          src={element.image}\n          alt={templateName}\n          style={{ width: \"100%\" }}\n          loading=\"lazy\"\n        />\n      )}\n      {/* {displayComponent(template.component)} */}\n      <Stack\n        height=\"calc(100% - 50px)\"\n        width=\"100%\"\n        direction=\"row\"\n        className=\"hover-content\"\n        justifyContent=\"center\"\n        alignItems={element.image ? \"center\" : \"flex-start\"}\n        spacing={1}\n        position=\"absolute\"\n        top={0}\n        left={0}\n        sx={{\n          backdropFilter: \"blur(0px)\",\n          transition: \"all 0.2s linear\",\n          bgcolor: alpha(\"#1F212B\", 0),\n\n          \"& button\": {\n            opacity: 0,\n          },\n\n          \"&:hover\": {\n            bgcolor: alpha(\"#1F212B\", 0.5),\n            backdropFilter: \"blur(5px)\",\n\n            \"& button\": {\n              opacity: 1,\n            },\n          },\n        }}\n      >\n        <Button\n          variant=\"contained\"\n          color=\"primary\"\n          sx={{\n            height: 40,\n            borderRadius: 1.5,\n            fontSize: 12,\n            letterSpacing: 1,\n            mt: element.image ? 0 : 3.5,\n          }}\n          size=\"small\"\n          onClick={async () => await updateElement(element.template)}\n        >\n          Ajouter\n        </Button>\n        {/* <IconButton size=\"small\" color=\"secondary\" title=\"Ajouter aux Favoris\">\n          {inFavories ? <BookmarkRounded /> : <BookmarkBorderRounded />}\n        </IconButton> */}\n      </Stack>\n      <Typography\n        sx={{\n          // position: \"absolute\",\n          // bottom: 0,\n          // left: -8,\n          height: 50,\n          py: 1,\n          px: 2,\n          fontSize: 24,\n          bgcolor: \"#0D0E11\",\n          width: \"100%\",\n          fontWeight: 700,\n          letterSpacing: 0.5,\n        }}\n      >\n        {templateName}\n      </Typography>\n    </Stack>\n  );\n};\n","import { TXStackTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_STACK_TEMPLATE1: TXStackTemplate = {\n  \"Bannière Par Defaut\": {\n    template: [\n      {\n        name: \"XStack\",\n        config: { index: \"CONT\" },\n        props: {\n          all: {},\n        },\n      },\n    ],\n  },\n};\n","import { TXStackTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_STACK_TEMPLATE2: TXStackTemplate = {\n  \"Bannière 1\": {\n    image:\n      \"https://firebasestorage.googleapis.com/v0/b/xoraia-prod.appspot.com/o/previews%2Fcontainers%2FXStack%2FBannie%CC%80re%201.png?alt=media&token=d833de9e-e230-4397-9ba4-d669931b4fdd\",\n    template: [\n      {\n        name: \"XStack\",\n        config: { index: \"CONT\" },\n        props: {\n          all: {\n            justifyContent: \"center\",\n            containerMode: \"CENTER\",\n            backgroundMode: \"FILL\",\n            height: \"500px\",\n            bgColor: \"#27191699\",\n            backgroundImage:\n              \"https://firebasestorage.googleapis.com/v0/b/xoraia-dev.appspot.com/o/wb%2Fimages%2FXN1JBHVpI42FB6wf4y82u?alt=media&token=3a941d86-0f29-4c6b-8f76-c39a301ff9f2\",\n            padding: {\n              Top: \"10px\",\n              Right: \"10px\",\n              Left: \"10px\",\n              Bottom: \"10px\",\n            },\n          },\n        },\n      },\n      {\n        name: \"XText\",\n        config: { index: \"TXT1\", childOf: \"CONT\" },\n        props: {\n          all: {\n            fontFamily: \"Poppins\",\n            fontSize: \"18px\",\n            letterSpacing: \"4px\",\n            text: \"ARRIVE BIENTOT\",\n            color: \"#FFFFFF\",\n          },\n        },\n      },\n      {\n        name: \"XText\",\n        config: { index: \"TXT2\", childOf: \"CONT\" },\n        props: {\n          all: {\n            fontFamily: \"Poppins\",\n            fontSize: \"56px\",\n            fontWeight: 900,\n            text: \"Nouvelle Collection\",\n            color: \"#FFFFFF\",\n          },\n        },\n      },\n      {\n        name: \"XText\",\n        config: { index: \"TXT3\", childOf: \"CONT\" },\n        props: {\n          all: {\n            fontFamily: \"Poppins\",\n            width: \"70%\",\n            fontSize: \"16px\",\n            margin: { Bottom: \"50px\" },\n            text: \"Découvrez la nouvelle collection de vêtements de votre magasin, avec des articles limités et des remises exceptionnelles.\",\n            color: \"#FFFFFF\",\n          },\n        },\n      },\n      {\n        name: \"XButton\",\n        config: { index: \"BTN1\", childOf: \"CONT\" },\n        props: {\n          all: {\n            fontFamily: \"Poppins\",\n            height: \"50px\",\n            width: \"150px\",\n            bgColor: \"#FFFFFF\",\n            color: \"#000000\",\n            fontSize: \"16px\",\n            text: \"ACHETER\",\n            hoverBgColor: \"#FFFFFF00\",\n            hoverBorder: { width: \"2px\", color: \"#FFFFFF\" },\n            hoverColor: \"#FFFFFF\",\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXStackTemplate } from \"../../../types/common/templates.types\";\nimport { X_STACK_TEMPLATE1 } from \"./template1\";\nimport { X_STACK_TEMPLATE2 } from \"./template2\";\n\nexport const X_STACK_TEMPLATES: TXStackTemplate = {\n  ...X_STACK_TEMPLATE1,\n  ...X_STACK_TEMPLATE2,\n};\n","import { TXBreadcrumbTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_BREADCRUMB_TEMPLATES: TXBreadcrumbTemplate = {\n  \"Historique par defaut\": {\n    template: [\n      {\n        name: \"XBreadcrumb\",\n        props: {\n          all: {},\n        },\n      },\n    ],\n  },\n};\n","import { MAIN_COLOR } from \"../../../constants/common/utils\";\nimport { TXButtonTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_BUTTON_TEMPLATES: TXButtonTemplate = {\n  \"Button par defaut\": {\n    template: [\n      {\n        name: \"XButton\",\n        props: {\n          all: {\n            text: \"Button\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n          },\n        },\n      },\n    ],\n  },\n  \"Button Arrondi\": {\n    template: [\n      {\n        name: \"XButton\",\n        props: {\n          all: {\n            text: \"Button\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n            borderRadius: {\n              TopLeft: \"5px\",\n              TopRight: \"5px\",\n              BottomLeft: \"5px\",\n              BottomRight: \"5px\",\n            },\n          },\n        },\n      },\n    ],\n  },\n  \"Button en Pillule\": {\n    template: [\n      {\n        name: \"XButton\",\n        props: {\n          all: {\n            text: \"Button\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n            borderRadius: {\n              TopLeft: \"25px\",\n              TopRight: \"25px\",\n              BottomLeft: \"25px\",\n              BottomRight: \"25px\",\n            },\n          },\n        },\n      },\n    ],\n  },\n  \"Button Bordé\": {\n    template: [\n      {\n        name: \"XButton\",\n        props: {\n          all: {\n            text: \"Button\",\n            color: MAIN_COLOR,\n            border: { style: \"solid\", width: \"2px\", color: MAIN_COLOR },\n            width: \"100px\",\n            textAlign: \"center\",\n            fontWeight: 600,\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n            borderRadius: {\n              TopLeft: \"5px\",\n              TopRight: \"5px\",\n              BottomLeft: \"5px\",\n              BottomRight: \"5px\",\n            },\n          },\n        },\n      },\n    ],\n  },\n  \"Groupe de Buttons\": {\n    template: [\n      {\n        name: \"XStack\",\n        config: { index: \"BTN_GROUP\" },\n        props: { all: { width: \"300px\", direction: \"row\" } },\n      },\n      {\n        name: \"XButton\",\n        config: { index: \"BTN_1\", childOf: \"BTN_GROUP\" },\n        props: {\n          all: {\n            text: \"Button 1\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n            borderRadius: {\n              TopLeft: \"8px\",\n              BottomLeft: \"8px\",\n            },\n          },\n        },\n      },\n      {\n        name: \"XButton\",\n        config: { index: \"BTN_2\", childOf: \"BTN_GROUP\" },\n        props: {\n          all: {\n            text: \"Button 2\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n          },\n        },\n      },\n      {\n        name: \"XButton\",\n        config: { index: \"BTN_3\", childOf: \"BTN_GROUP\" },\n        props: {\n          all: {\n            text: \"Button 3\",\n            bgColor: MAIN_COLOR,\n            color: \"#ffffff\",\n            fontWeight: 600,\n            width: \"100px\",\n            textAlign: \"center\",\n            padding: { Top: \"10px\", Bottom: \"10px\" },\n            borderRadius: {\n              TopRight: \"8px\",\n              BottomRight: \"8px\",\n            },\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXFormTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_FORM_TEMPLATES: TXFormTemplate = {\n  \"Formulaire de contact 1\": {\n    template: [\n      {\n        name: \"XForm\",\n        props: {\n          all: { type: \"contact-us\", inputDesign: \"inline\" },\n        },\n      },\n    ],\n  },\n  // \"Button Arrondi\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button en Pillule\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"25px\",\n  //             TopRight: \"25px\",\n  //             BottomLeft: \"25px\",\n  //             BottomRight: \"25px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button Bordé\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           color: MAIN_COLOR,\n  //           border: { style: \"solid\", width: \"2px\", color: MAIN_COLOR },\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           fontWeight: 600,\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Groupe de Buttons\": {\n  //   template: [\n  //     {\n  //       name: \"XStack\",\n  //       config: { index: \"BTN_GROUP\" },\n  //       props: { all: { width: \"300px\", direction: \"row\" } },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_1\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 1\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"8px\",\n  //             BottomLeft: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_2\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 2\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_3\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 3\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopRight: \"8px\",\n  //             BottomRight: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n};\n","import { TXIconTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_ICON_TEMPLATES: TXIconTemplate = {\n  \"Icone Par Defaut\": {\n    template: [\n      {\n        name: \"XIcon\",\n        props: { all: { icon: \"favorite\" } },\n      },\n    ],\n  },\n};\n","import { TXImageTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_IMAGE_TEMPLATES: TXImageTemplate = {\n  \"Image Par Defaut\": {\n    template: [\n      {\n        name: \"XImage\",\n        props: {\n          all: {\n            src: \"https://d-themes.com/wordpress/riode/demo-24/wp-content/uploads/sites/29/2020/09/product-6-2-1-600x675.jpg\",\n            width: \"200px\",\n            height: \"360px\",\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXMapTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_MAP_TEMPLATES: TXMapTemplate = {\n  \"Carte par defaut\": {\n    template: [\n      {\n        name: \"XMap\",\n        props: {\n          all: {},\n        },\n      },\n    ],\n  },\n  // \"Button Arrondi\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button en Pillule\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"25px\",\n  //             TopRight: \"25px\",\n  //             BottomLeft: \"25px\",\n  //             BottomRight: \"25px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button Bordé\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           color: MAIN_COLOR,\n  //           border: { style: \"solid\", width: \"2px\", color: MAIN_COLOR },\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           fontWeight: 600,\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Groupe de Buttons\": {\n  //   template: [\n  //     {\n  //       name: \"XStack\",\n  //       config: { index: \"BTN_GROUP\" },\n  //       props: { all: { width: \"300px\", direction: \"row\" } },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_1\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 1\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"8px\",\n  //             BottomLeft: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_2\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 2\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_3\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 3\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopRight: \"8px\",\n  //             BottomRight: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n};\n","import { MAIN_COLOR } from \"../../../constants/common/utils\";\nimport { TXRatingTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_RATING_TEMPLATES: TXRatingTemplate = {\n  \"Notes par defaut\": {\n    template: [\n      {\n        name: \"XRating\",\n        props: {\n          all: {\n            initialRate: 3,\n            color: MAIN_COLOR,\n          },\n        },\n      },\n    ],\n  },\n  // \"Button Arrondi\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button en Pillule\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"25px\",\n  //             TopRight: \"25px\",\n  //             BottomLeft: \"25px\",\n  //             BottomRight: \"25px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Button Bordé\": {\n  //   template: [\n  //     {\n  //       name: \"XRating\",\n  //       props: {\n  //         all: {\n  //           text: \"Button\",\n  //           color: MAIN_COLOR,\n  //           border: { style: \"solid\", width: \"2px\", color: MAIN_COLOR },\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           fontWeight: 600,\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"5px\",\n  //             TopRight: \"5px\",\n  //             BottomLeft: \"5px\",\n  //             BottomRight: \"5px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n  // \"Groupe de Buttons\": {\n  //   template: [\n  //     {\n  //       name: \"XStack\",\n  //       config: { index: \"BTN_GROUP\" },\n  //       props: { all: { width: \"300px\", direction: \"row\" } },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_1\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 1\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopLeft: \"8px\",\n  //             BottomLeft: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_2\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 2\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //         },\n  //       },\n  //     },\n  //     {\n  //       name: \"XRating\",\n  //       config: { index: \"BTN_3\", childOf: \"BTN_GROUP\" },\n  //       props: {\n  //         all: {\n  //           text: \"Button 3\",\n  //           bgColor: MAIN_COLOR,\n  //           color: \"#ffffff\",\n  //           fontWeight: 600,\n  //           width: \"100px\",\n  //           textAlign: \"center\",\n  //           padding: { Top: \"10px\", Bottom: \"10px\" },\n  //           borderRadius: {\n  //             TopRight: \"8px\",\n  //             BottomRight: \"8px\",\n  //           },\n  //         },\n  //       },\n  //     },\n  //   ],\n  // },\n};\n","import { TXTextTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_TEXT_TEMPLATES: TXTextTemplate = {\n  \"Paragraphe 1\": {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"body1\", text: \"Paragraphe 1\" } },\n      },\n    ],\n  },\n  \"Paragraphe 2\": {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"body2\", text: \"Paragraphe 1\" } },\n      },\n    ],\n  },\n  H1: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h1\", text: \"Heading 1\" } },\n      },\n    ],\n  },\n  H2: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h2\", text: \"Heading 2\" } },\n      },\n    ],\n  },\n  H3: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h3\", text: \"Heading 3\" } },\n      },\n    ],\n  },\n  H4: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h4\", text: \"Heading 4\" } },\n      },\n    ],\n  },\n  H5: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h5\", text: \"Heading 5\" } },\n      },\n    ],\n  },\n  H6: {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"h6\", text: \"Heading 6\" } },\n      },\n    ],\n  },\n  \"Sous-Titre 1\": {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"subtitle1\", text: \"Sous-Titre 1\" } },\n      },\n    ],\n  },\n  \"Sous-Titre 2\": {\n    template: [\n      {\n        name: \"XText\",\n        props: { all: { tag: \"subtitle2\", text: \"Sous-Titre 2\" } },\n      },\n    ],\n  },\n  Caption: {\n    template: [\n      {\n        name: \"XText\",\n        props: {\n          all: {\n            tag: \"caption\",\n            text: \"Caption\",\n          },\n        },\n      },\n    ],\n  },\n  OverLine: {\n    template: [\n      {\n        name: \"XText\",\n        props: {\n          all: {\n            tag: \"overline\",\n            text: \"OVERLINE\",\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXProductDetailsTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_PRODUCT_DETAILS_TEMPLATE1: TXProductDetailsTemplate = {\n  \"Template avec Grille\": {\n    image:\n      \"https://firebasestorage.googleapis.com/v0/b/xoraia-prod.appspot.com/o/previews%2Fcontainers%2FXProductDetails%2FCapture%20d%E2%80%99e%CC%81cran%202022-11-19%20a%CC%80%2014.47.49.png?alt=media&token=d81a3f09-8120-4199-8d0c-43332da70f3b\",\n    template: [\n      {\n        name: \"XProductDetails\",\n        props: {\n          all: { padding: { Top: \"20px\", Bottom: \"20px\" } },\n        },\n      },\n    ],\n  },\n};\n","import { TXProductDetailsTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_PRODUCT_DETAILS_TEMPLATE2: TXProductDetailsTemplate = {\n  \"Template avec Liste\": {\n    image:\n      \"https://firebasestorage.googleapis.com/v0/b/xoraia-prod.appspot.com/o/previews%2Fcontainers%2FXProductDetails%2FCapture%20d%E2%80%99e%CC%81cran%202022-11-19%20a%CC%80%2014.46.04.png?alt=media&token=6567f799-f303-4d3e-91e1-a46728b23072\",\n    template: [\n      {\n        name: \"XProductDetails\",\n        props: {\n          all: {\n            previewMode: \"list\",\n            padding: { Top: \"20px\", Bottom: \"20px\" },\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXProductDetailsTemplate } from \"../../../types/common/templates.types\";\nimport { X_PRODUCT_DETAILS_TEMPLATE1 } from \"./template1\";\nimport { X_PRODUCT_DETAILS_TEMPLATE2 } from \"./template2\";\n\nexport const X_PRODUCT_DETAILS_TEMPLATES: TXProductDetailsTemplate = {\n  ...X_PRODUCT_DETAILS_TEMPLATE1,\n  ...X_PRODUCT_DETAILS_TEMPLATE2,\n};\n","import { TXCategoryFilterTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_CATEGORY_FILTER_TEMPLATE1: TXCategoryFilterTemplate = {\n  \"Filtre par Defaut\": {\n    template: [\n      {\n        name: \"XCategoryFilter\",\n        props: {\n          all: {},\n        },\n      },\n    ],\n  },\n};\n","import { TXCategoryFilterTemplate } from \"../../../types/common/templates.types\";\nimport { X_CATEGORY_FILTER_TEMPLATE1 } from \"./template1\";\n\nexport const X_CATEGORY_FILTER_TEMPLATES: TXCategoryFilterTemplate = {\n  ...X_CATEGORY_FILTER_TEMPLATE1,\n};\n","import { TXGridTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_GRID_COL_2: TXGridTemplate = {\n  \"Grille à 2 Colonnes\": {\n    template: [\n      {\n        name: \"XGrid\",\n        props: {\n          all: {\n            columns: 2,\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXGridTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_GRID_COL_3: TXGridTemplate = {\n  \"Grille à 3 Colonnes\": {\n    template: [\n      {\n        name: \"XGrid\",\n        props: {\n          all: {\n            columns: 3,\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXGridTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_GRID_COL_4: TXGridTemplate = {\n  \"Grille à 4 Colonnes\": {\n    template: [\n      {\n        name: \"XGrid\",\n        props: {\n          all: {\n            columns: 4,\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXGridTemplate } from \"../../../types/common/templates.types\";\nimport { X_GRID_COL_2 } from \"./col2\";\nimport { X_GRID_COL_3 } from \"./col3\";\nimport { X_GRID_COL_4 } from \"./col4\";\n\nexport const X_GRID_TEMPLATES: TXGridTemplate = {\n  ...X_GRID_COL_2,\n  ...X_GRID_COL_3,\n  ...X_GRID_COL_4,\n};\n","import { TXCarouselTemplate } from \"../../../types/common/templates.types\";\n\nexport const X_CAROUSEL_TEMPLATE_1: TXCarouselTemplate = {\n  \"Carousel Vide\": {\n    template: [\n      {\n        name: \"XCarousel\",\n        props: {\n          all: {\n            columns: 1,\n          },\n        },\n      },\n    ],\n  },\n};\n","import { TXCarouselTemplate } from \"../../../types/common/templates.types\";\nimport { X_CAROUSEL_TEMPLATE_1 } from \"./template1\";\n\nexport const X_CAROUSEL_TEMPLATES: TXCarouselTemplate = {\n  ...X_CAROUSEL_TEMPLATE_1,\n};\n","import { TTemplate } from \"../types/common/templates.types\";\nimport { TComponentName } from \"../types/common/components.types\";\nimport { X_STACK_TEMPLATES } from \"./containers/XStack\";\nimport { X_BREADCRUMB_TEMPLATES } from \"./elements/XBreadcrumb\";\nimport { X_BUTTON_TEMPLATES } from \"./elements/XButton\";\nimport { X_FORM_TEMPLATES } from \"./elements/XForm\";\nimport { X_ICON_TEMPLATES } from \"./elements/XIcon\";\nimport { X_IMAGE_TEMPLATES } from \"./elements/XImage\";\nimport { X_MAP_TEMPLATES } from \"./elements/XMap\";\nimport { X_RATING_TEMPLATES } from \"./elements/XRating\";\nimport { X_TEXT_TEMPLATES } from \"./elements/XText\";\nimport { X_PRODUCT_DETAILS_TEMPLATES } from \"./containers/XProductDetails\";\nimport { X_CATEGORY_FILTER_TEMPLATES } from \"./containers/XCategoryFilter\";\nimport { X_GRID_TEMPLATES } from \"./containers/XGrid\";\nimport { X_CAROUSEL_TEMPLATES } from \"./containers/XCarousel\";\n\ntype TMainTemplates = { [componentName in TComponentName]?: TTemplate };\n\nexport const TEMPLATES: TMainTemplates = {\n  // CONTAINERS\n  XStack: X_STACK_TEMPLATES,\n  XGrid: X_GRID_TEMPLATES,\n  XCarousel: X_CAROUSEL_TEMPLATES,\n  XProductDetails: X_PRODUCT_DETAILS_TEMPLATES,\n  XCategoryFilter: X_CATEGORY_FILTER_TEMPLATES,\n\n  // ELEMENTS\n  XText: X_TEXT_TEMPLATES,\n  XButton: X_BUTTON_TEMPLATES,\n  XRating: X_RATING_TEMPLATES,\n  XMap: X_MAP_TEMPLATES,\n  XBreadcrumb: X_BREADCRUMB_TEMPLATES,\n  XForm: X_FORM_TEMPLATES,\n  XIcon: X_ICON_TEMPLATES,\n  XImage: X_IMAGE_TEMPLATES,\n};\n"]}