import{_ as f,a as g,b as S,c as b}from"./query.js";import{o as i,c as s,b as m,w as _,n as v,T as r,d as l,a as o,t as d,f as a,p as y,g as T,e as p,_ as E}from"./index.js";const h=e=>(y("data-v-2a2c1c07"),e=e(),T(),e),k={class:"notification--container iface-centered"},w={class:"notification-icon"},N={key:0,class:"notification-icon--value"},P={key:0,class:"notification-bottom"},I={key:0,class:"notification-bottom--data"},x=h(()=>o("div",{class:"notification-bottom--title"},[p("Непрочитанные"),o("br"),p("уведомления")],-1)),C=[x],M={key:1,class:"notification-bottom--data"},O={class:"notification-bottom--title"},Y=h(()=>o("div",{class:"notification-bottom--text"},"Ответил на ваш запрос",-1)),A={class:"notification-bottom--hint param"};function R(e,n,c,D,t,u){return i(),s("div",k,[m(r,{name:"scale"},{default:_(()=>[t.animateState?(i(),s("div",{key:0,class:v(["notification",{notification_mobile:u.isMobile}])},[m(r,{name:"scale"},{default:_(()=>[t.animateState>1?(i(),s("div",{key:0,class:"notification-content",style:l(`background-image: url(${t.images["/src/assets/images/notification/"+t.BACKGROUNDS[t.type]]})`)},[o("div",w,[o("div",{class:"notification-icon-img",style:l({backgroundImage:`url(${t.images[`/src/assets/images/notification/${t.ICONS[t.type]}`]})`})},null,4),t.count?(i(),s("div",N,d(t.count>9?"9+":t.count),1)):a("",!0)]),m(r,{name:"fade"},{default:_(()=>[t.animateState>2?(i(),s("div",P,[t.type==t.TYPES.MESSAGE?(i(),s("div",I,C)):a("",!0),t.type==t.TYPES.QUERY?(i(),s("div",M,[o("div",O,d(t.nickname.replace("_"," ")),1),Y,o("div",A,d("#"+t.param),1)])):a("",!0)])):a("",!0)]),_:1})],4)):a("",!0)]),_:1})],2)):a("",!0)]),_:1})])}const B={props:["openParams"],data(){return{images:Object.assign({"/src/assets/images/notification/bg.png":f,"/src/assets/images/notification/bg2.png":g,"/src/assets/images/notification/message.png":S,"/src/assets/images/notification/query.png":b}),HOLD_TIME:5e3,BACKGROUNDS:["bg.png","bg2.png"],ICONS:["message.png","query.png"],TYPES:{MESSAGE:0,QUERY:1},animateState:0,type:0,count:1,nickname:"Pavel_Addams",param:123214}},computed:{isMobile(){return this.$root.isMobile}},created(){if(this.$data.noAdaptation=!0,this.openParams){const e=this.openParams[0];this.type=e,this.count=this.openParams[1],e==this.TYPES.QUERY&&(this.nickname=this.openParams[2],this.param=this.openParams[3])}},mounted(){let e=window.interface("Hud");const n=()=>{this.show(),setTimeout(()=>{this.hide(),setTimeout(()=>window.closeInterface("Notification"),1e3)},500+this.HOLD_TIME)},c=e.$refs.radmir;e&&c&&c.$refs.wanted.isShown?setTimeout(()=>n(),5e3):n()},methods:{show(){this.animateState=1,setTimeout(()=>{this.animateState=2,setTimeout(()=>this.animateState=3,250)},250)},hide(){this.animateState=3,setTimeout(()=>{this.animateState=2,setTimeout(()=>{this.animateState=1,setTimeout(()=>this.animateState=0,250)},250)},250)}}},V=E(B,[["render",R],["__scopeId","data-v-2a2c1c07"]]);export{V as default};
