{"version":3,"file":"SplashElement-217ae8ae.js","sources":["../../src/components/Files/Templates/Designs/Mobler/src/components/SplashElement.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport {onBeforeMount, ref} from \"vue\";\r\nimport {getTranslation, getSettings} from \"@/ts/utilities.ts\";\r\n\r\nconst settings = getSettings()\r\n\r\nconst props = defineProps({\r\n\ttype: {\r\n\t\ttype: Number,\r\n\t},\r\n\tsplashTextColor: {\r\n\t\ttype: String,\r\n\t},\r\n\tsplashBackgroundColor: {\r\n\t\ttype: String,\r\n\t},\r\n})\r\n\r\nlet splashTranslations = ref()\r\n\r\nsplashTranslations.value = {\r\n\ttranslationSplashProductOffer: getTranslation('ProductOffer'),\r\n\ttranslationSplashNewItem: getTranslation('ProductNew'),\r\n\ttranslationSplashLowPrice: getTranslation('ProductLowPrice'),\r\n\ttranslationSplashDailyPrice: getTranslation('ProductDailyPriceSplash'),\r\n\ttranslationSplashCombinationOffer: getTranslation('ProductCombinationOffer'),\r\n\ttranslationSplashJubileePrice: getTranslation('ProductJubileePrice')\r\n}\r\n\r\n\r\n// Set splash class\r\nlet splashInfo = ref({\r\n\tclass: '',\r\n\ttext: ''\r\n})\r\n\r\nconst setBlackFridayTheme = () => {\r\n\tif (settings?.blackFridayTheme) {\r\n\t\treturn 'bg-black text-white'\r\n\t} else {\r\n\t\treturn 'bg-yellow text-black'\r\n\t}\r\n}\r\n\r\nconst setSplash = () => {\r\n\tif (props.type == 1) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: setBlackFridayTheme(),\r\n\t\t\ttext: splashTranslations.value.translationSplashProductOffer\r\n\t\t}\r\n\t} else if (props.type == 2) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: 'bg-primary text-white',\r\n\t\t\ttext: splashTranslations.value.translationSplashNewItem\r\n\t\t}\r\n\t} else if (props.type == 3) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: 'bg-purple text-white',\r\n\t\t\ttext: splashTranslations.value.translationSplashLowPrice\r\n\t\t}\r\n\t} else if (props.type == 4) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: 'bg-black text-yellow',\r\n\t\t\ttext: splashTranslations.value.translationSplashDailyPrice\r\n\t\t}\r\n\t} else if (props.type == 5) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: 'bg-yellow text-black',\r\n\t\t\ttext: splashTranslations.value.translationSplashCombinationOffer\r\n\t\t}\r\n\t} else if (props.type == 6) {\r\n\t\tsplashInfo.value = {\r\n\t\t\tclass: 'bg-beige-light text-gold',\r\n\t\t\ttext: splashTranslations.value.translationSplashJubileePrice\r\n\t\t}\r\n\t}\r\n}\r\n\r\nonBeforeMount(() => {\r\n\tsetSplash()\r\n})\r\n\r\n</script>\r\n\r\n<template>\r\n\t<div\r\n\t\tclass=\"flex items-center justify-center h-16 w-16 absolute top-4 right-4 p-4 rounded-full product-card-splash\"\r\n\t\t:class=\"splashInfo.class\"\r\n\t\t:style=\"props.splashBackgroundColor ? `background-color: ${props.splashBackgroundColor};` : ''\"\r\n  \t\t>\r\n\t    <p class=\"m-0 uppercase text-xs font-bold leading-4 text-center\"\r\n\t\t\t:style=\"props.splashTextColor ? `color: ${props.splashTextColor};` : ''\"\r\n\t\t\t>\r\n\t\t\t{{ splashInfo.text }}\r\n\t\t</p>\r\n  \t</div>\r\n</template>\r\n"],"names":["settings","getSettings","props","__props","splashTranslations","ref","getTranslation","splashInfo","setBlackFridayTheme","setSplash","onBeforeMount"],"mappings":"4PAIA,MAAMA,EAAWC,IAEXC,EAAQC,EAYd,IAAIC,EAAqBC,IAEzBD,EAAmB,MAAQ,CAC1B,8BAA+BE,EAAe,cAAc,EAC5D,yBAA0BA,EAAe,YAAY,EACrD,0BAA2BA,EAAe,iBAAiB,EAC3D,4BAA6BA,EAAe,yBAAyB,EACrE,kCAAmCA,EAAe,yBAAyB,EAC3E,8BAA+BA,EAAe,qBAAqB,CAAA,EAKpE,IAAIC,EAAaF,EAAI,CACpB,MAAO,GACP,KAAM,EAAA,CACN,EAED,MAAMG,EAAsB,IACvBR,GAAA,MAAAA,EAAU,iBACN,sBAEA,uBAIHS,EAAY,IAAM,CACnBP,EAAM,MAAQ,EACjBK,EAAW,MAAQ,CAClB,MAAOC,EAAoB,EAC3B,KAAMJ,EAAmB,MAAM,6BAAA,EAEtBF,EAAM,MAAQ,EACxBK,EAAW,MAAQ,CAClB,MAAO,wBACP,KAAMH,EAAmB,MAAM,wBAAA,EAEtBF,EAAM,MAAQ,EACxBK,EAAW,MAAQ,CAClB,MAAO,uBACP,KAAMH,EAAmB,MAAM,yBAAA,EAEtBF,EAAM,MAAQ,EACxBK,EAAW,MAAQ,CAClB,MAAO,uBACP,KAAMH,EAAmB,MAAM,2BAAA,EAEtBF,EAAM,MAAQ,EACxBK,EAAW,MAAQ,CAClB,MAAO,uBACP,KAAMH,EAAmB,MAAM,iCAAA,EAEtBF,EAAM,MAAQ,IACxBK,EAAW,MAAQ,CAClB,MAAO,2BACP,KAAMH,EAAmB,MAAM,6BAAA,EAEjC,EAGD,OAAAM,EAAc,IAAM,CACTD,GAAA,CACV"}