"use strict";(globalThis["webpackChunkradmir_interfaces"]=globalThis["webpackChunkradmir_interfaces"]||[]).push([[4179],{818106:(e,t,i)=>{function n(e){let t=e.match(/(\{[a-zA-Z0-9]{6}\}|\{[a-zA-Z0-9]{8}\})/g);if(t)for(let i of t){let t=i.replace("{","").replace("}","");e=e.split(i).join(`<span style="color: #${t}">`)}return e}function s(e){const t=e.replace("#",""),i=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),s=parseInt(t.substring(4,6),16),r=(299*i+587*n+114*s)/1e3;return r>155}i.d(t,{Q:()=>s,Z:()=>n})},333413:(e,t,i)=>{i.r(t),i.d(t,{default:()=>_});var n=i(373396),s=i(87139),r=i(349242);const o=i.p+"assets/src/assets/images/screen-notification/bell.svg",a={class:"screen-notification__title"},c=(0,n._)("img",{src:o},null,-1),l=["innerHTML"],u=["innerHTML"];function d(e,t,i,o,d,p){return(0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)(["screen-notification iface-container",{"screen-notification_mobile":p.isMobile}])},[(0,n.Wm)(r.uT,{name:`slide-${p.positionClass?p.positionClass:"top"}`,tag:"div",appear:""},{default:(0,n.w5)((()=>[p.currentItem?((0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)(["screen-notification__item",`screen-notification__item_${p.positionClass}`]),key:p.currentItem.id},[(0,n._)("div",{class:"screen-notification__circle",style:(0,s.j5)({background:p.circleColor})},null,4),(0,n._)("div",a,[c,(0,n._)("div",{class:"screen-notification__title-text",innerHTML:p.currentItem.title},null,8,l)]),(0,n._)("div",{class:"screen-notification__text",innerHTML:p.currentItem.text},null,8,u)],2)):(0,n.kq)("",!0)])),_:1},8,["name"])],2)}var p=i(818106);const T={TOP:0,LEFT:1,BOTTOM:2},f={[T.TOP]:"top",[T.LEFT]:"left",[T.BOTTOM]:"bottom"},h={props:["openParams"],data:()=>({lastID:0,queue:[]}),computed:{currentItem(){return this.queue[0]?this.queue[0]:null},positionClass(){if(!this.currentItem)return;const e=this.currentItem.position;return void 0===e?null:f[e]},circleColor(){const e=this.currentItem.color;if(!e)return null;const{r:t,g:i,b:n}=this.hexToRgb(e);return`radial-gradient(39.31% 39.31% at 50% 50%, rgba(${t}, ${i}, ${n}, 0.4) 0%, rgba(${t}, ${i}, ${n}, 0) 100%)`},isMobile(){return this.$root.isMobile}},methods:{hideAll(){this.queue.splice(0,this.queue.length),this.$forceUpdate()},add(e){const t={POSITION:0,TITLE:1,TEXT:2,COLOR:3,DURATION:4},i=JSON.parse(e),n=i[t.POSITION],s=(0,p.Z)(i[t.TITLE]),r=(0,p.Z)(i[t.TEXT]),o=i[t.COLOR],a=i[t.DURATION],c=++this.lastID,l={id:c,position:n,title:s,text:r,color:o};this.queue.push(l),setTimeout((()=>this.onItemHide(c)),a)},onItemHide(e){this.queue=this.queue.filter((t=>t.id!==e)),this.$forceUpdate()},hexToRgb(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}}};var m=i(940089);const I=(0,m.Z)(h,[["render",d]]),_=I}}]);