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ACC,EAAOrB,GAAI,wGAAyG,KAElJ,QAAemB,EAAwBG","sources":["webpack://frontend-setup/./src/components/molecules/flyin-update/flyin-update.tsx","webpack://frontend-setup/./src/components/molecules/flyin-update/flyin-update.scss"],"sourcesContent":["import { defineElement, FC, onDidLoad, useProp } from '@atomify/hooks';\nimport { h } from '@atomify/jsx';\nimport { ButtonA } from '@atoms/button/button';\nimport { Flyin } from '@molecules/fly-in/fly-in';\nimport { Image } from '@source/components/atoms/image';\nimport { openFlyin } from '@source/store/flyins';\nimport { useStylesheet } from '@utilities/hooks';\nimport cookies from 'js-cookie';\n\nimport style from './flyin-update.scss';\n\nconst HIDDEN_CLASS = 'u-sr-only';\nconst FLYIN_ID = 'flyin-update';\n\nexport const FlyinUpdate: FC = ({ element }) => {\n const [flyinCookie] = useProp('flyinCookie');\n const [flyinLabel] = useProp('flyinLabel');\n const [flyinButtonLabel] = useProp('flyinButtonLabel', '');\n const [flyinButtonLink] = useProp('flyinButtonLink', '');\n const [flyinCardTitle] = useProp('flyinCardTitle', '');\n const [flyinCardImage] = useProp('flyinCardImage', '');\n\n useStylesheet(style);\n\n onDidLoad(() => {\n renderFlyin();\n\n const cookie = cookies.get(flyinCookie);\n if (!cookie) setTimeout(() => openFlyin(FLYIN_ID), 300);\n });\n\n function onFlyinClose() {\n cookies.set(flyinCookie, 'true', { expires: 365 });\n }\n\n function renderFlyin() {\n const children = [...element.childNodes];\n element.innerHTML = '';\n\n element.append(\n \n
\n {flyinCardImage && (\n \n )}\n
\n {flyinCardTitle &&

{flyinCardTitle}

}\n
\n {children}\n
\n {flyinButtonLabel && (\n \n )}\n
\n
\n
,\n );\n\n element.classList.remove(HIDDEN_CLASS);\n }\n};\n\nFlyinUpdate.props = {\n flyinCookie: {\n type: String,\n required: true,\n },\n flyinLabel: {\n type: String,\n required: true,\n },\n flyinButtonLabel: {\n type: String,\n },\n flyinButtonLink: {\n type: String,\n },\n flyinCardTitle: {\n type: String,\n },\n flyinCardImage: {\n type: String,\n },\n};\n\ndefineElement('bpd-flyin-update', FlyinUpdate);\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".flyin-update__card{background-color:var(--color-white)}.flyin-update__content{padding:3.2rem 1.6rem}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["HIDDEN_CLASS","FLYIN_ID","FlyinUpdate","element","flyinCookie","flyinLabel","flyinButtonLabel","flyinButtonLink","flyinCardTitle","flyinCardImage","onFlyinClose","expires","renderFlyin","children","childNodes","innerHTML","append","id","label","onClose","class","image","alt","preload","width","height","settings","objectFit","url","classList","remove","setTimeout","props","type","String","required","___CSS_LOADER_EXPORT___","push","module","toString"],"sourceRoot":""}