"use strict";(globalThis["webpackChunkradmir_interfaces"]=globalThis["webpackChunkradmir_interfaces"]||[]).push([[8742],{818106:(e,t,n)=>{function s(e){let t=e.match(/(\{[a-zA-Z0-9]{6}\}|\{[a-zA-Z0-9]{8}\})/g);if(t)for(let n of t){let t=n.replace("{","").replace("}","");e=e.split(n).join(`<span style="color: #${t}">`)}return e}function i(e){const t=e.replace("#",""),n=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16),o=(299*n+587*s+114*i)/1e3;return o>155}n.d(t,{Q:()=>i,Z:()=>s})},238742:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var s=n(373396),i=n(349242),o=n(87139);const r={class:"offer iface-container"},a={class:"offer__container"},c={class:"offer__content"},_=(0,s._)("div",{class:"offer__btn__text"},"N",-1),f=[_],l={class:"offer__data"},d={class:"offer__title"},v=["innerHTML"],h=(0,s._)("div",{class:"offer__btn__text"},"Y",-1),u=[h];function p(e,t,n,_,h,p){return(0,s.wg)(),(0,s.iD)("div",r,[(0,s.Wm)(i.uT,{name:"slide",appear:""},{default:(0,s.w5)((()=>[(0,s._)("div",a,[(0,s._)("div",c,[(0,s._)("div",{class:(0,o.C_)(["offer__btn",{offer__btn_active:e.isActiveNoBtn}]),onClick:t[0]||(t[0]=(...e)=>p.no&&p.no(...e))},f,2),(0,s._)("div",l,[(0,s._)("div",d,(0,o.zw)(e.title),1),(0,s._)("div",{class:"offer__text",innerHTML:e.text},null,8,v)]),(0,s._)("div",{class:(0,o.C_)(["offer__btn",{offer__btn_active:e.isActiveYesBtn}]),onClick:t[1]||(t[1]=(...e)=>p.yes&&p.yes(...e))},u,2)])])])),_:1})])}var E=n(818106);const m={props:["openParams"],data:()=>({title:"Предложение",text:"Вы хотите посмотреть список доступных работ?",noAdaptation:!0,isActiveYesBtn:!1,isActiveNoBtn:!1}),created(){this.openParams&&(this.title=this.openParams[0],this.text=(0,E.Z)(this.openParams[1]))},mounted(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)},unmounted(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)},methods:{setInfo(e,t){this.title=e,this.text=(0,E.Z)(t)},yes(){console.log("yes"),this.close(),sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"OnOffersConfirm",1)},no(){console.log("no"),this.close(),sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"OnOffersConfirm",0)},onKeyUp({keyCode:e}){e===window.KEY_CODE_Y&&(this.isActiveYesBtn=!1,this.yes()),e===window.KEY_CODE_N&&(this.isActiveNoBtn=!1,this.no())},onKeyDown({keyCode:e}){e===window.KEY_CODE_Y&&(this.isActiveYesBtn=!0),e===window.KEY_CODE_N&&(this.isActiveNoBtn=!0)},close(){window.closeInterface("Offer")}}};var w=n(940089);const C=(0,w.Z)(m,[["render",p]]),y=C}}]);