import{_ as u,a as p}from"./open.js";/* empty css     */import{H as b}from"./Heading.js";import{C as v}from"./Button.js";import{f}from"./numbers.js";import{r as _,o as a,c,a as s,b as l,w as d,e as g,t as i,f as w,T as C,_ as k}from"./index.js";import"./telegram-authenticator.js";import"./close2.js";import"./donate.js";import"./money.js";const T={class:"business iface-container"},x={key:0,class:"business-content"},y=["src"],A={class:"business-data table"},E={class:"table-row"},N=s("div",{class:"col"},"Владелец",-1),P={class:"col"},S={class:"table-row"},B=s("div",{class:"col"},"Класс",-1),M={class:"col"},D={class:"table-row"},I=s("div",{class:"col"},"Количество комнат",-1),K={class:"col"},O={class:"table-row"},V=s("div",{class:"col"},"Стоимость аренды",-1),L={class:"col business-price-block"},W=s("div",{class:"business-rouble-sign"},null,-1),Y={class:"text"},H={class:"business-data table"},U={class:"table-row"},j=s("div",{class:"col"},"Государственная стоимость",-1),z={class:"col business-price-block"},q=s("div",{class:"business-rouble-sign"},null,-1),F={class:"text"},G=s("div",{class:"text"},"Взаимодействие",-1);function J(r,o,R,X,e,t){const m=_("heading"),h=_("control-button");return a(),c("div",T,[s("div",{class:"business-overlay",onClick:o[0]||(o[0]=(...n)=>t.close&&t.close(...n))}),l(C,{name:"slide-bottom"},{default:d(()=>[e.state?(a(),c("div",x,[l(m,{size:"42"},{default:d(()=>[g(i(e.name),1)]),_:1}),s("img",{class:"business-status",src:e.statusImage[`/src/assets/images/business/${e.STATUSES[e.type]}.svg`]},null,8,y),s("div",A,[s("div",E,[N,s("div",P,i(e.owner.replace("_"," ")),1)]),s("div",S,[B,s("div",M,i(e.className),1)]),s("div",D,[I,s("div",K,i(e.rooms),1)]),s("div",O,[V,s("div",L,[W,s("div",Y,i(t.formatNumberWithSpaces(e.rent)),1)])])]),s("div",H,[s("div",U,[j,s("div",z,[q,s("div",F,i(t.formatNumberWithSpaces(e.price)),1)])])]),t.isMobile?(a(),c("div",{key:1,class:"business-enter",onClick:o[2]||(o[2]=(...n)=>t.enter&&t.enter(...n))},"Войти")):(a(),c("div",{key:0,class:"business-control",onClick:o[1]||(o[1]=(...n)=>t.enter&&t.enter(...n))},[l(h,{keyCode:e.KEY_CODE_ALT,text:"Alt"},null,8,["keyCode"]),G]))])):w("",!0)]),_:1})])}const Q={props:["openParams"],components:{Heading:b,ControlButton:v},data(){return{statusImage:Object.assign({"/src/assets/images/business/closed.svg":u,"/src/assets/images/business/open.svg":p}),KEY_CODE_ALT:window.KEY_CODE_ALT,state:0,STATUSES:["closed","open"],name:"Квартира №4",type:0,owner:"Pavel_Addams",className:"Эконом",rooms:1,rent:1500,price:12e4}},computed:{isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.type=this.openParams[0],this.name=this.openParams[1],this.owner=this.openParams[2],this.className=this.openParams[3],this.rooms=this.openParams[4],this.rent=this.openParams[5],this.price=this.openParams[6]),this.isMobile?this.state=!0:this.$nextTick(()=>this.state=!0)},methods:{formatNumberWithSpaces:f,close(){const r=()=>window.closeInterface("Appartament");if(this.isMobile){r();return}this.state=!1,setTimeout(()=>{this.$nextTick(()=>r())},300)},enter(){window.sendClientKeyEvent("Alt")}}},rs=k(Q,[["render",J]]);export{rs as default};
