import{_ as A,a as D,b as E,c as I,d as k,e as O}from"./4.js";import{S as P}from"./ScrollableContainer.js";import{B as T}from"./ButtonContainer.js";import{C as L}from"./Button.js";import{r as _,o as a,c as o,a as t,t as c,b as d,w as b,F as u,i as p,e as h,n as M,p as N,g as K,_ as V}from"./index.js";import"./dom.js";/* empty css                                                               */import"./telegram-authenticator.js";import"./close2.js";import"./donate.js";import"./money.js";const g=e=>(N("data-v-3e1ec062"),e=e(),K(),e),Y={class:"cargo__container"},F=g(()=>t("div",{class:"cargo__before"},null,-1)),z={class:"cargo__content"},G={class:"cargo__row cargo__head"},J=g(()=>t("img",{class:"cargo__head-icon",src:A},null,-1)),R={class:"cargo__head-content"},q=g(()=>t("div",{class:"cargo__head-title"},"Борьба за груз",-1)),H={class:"cargo__head-text"},Q={class:"cargo__row-title"},U=["src"],W={class:"cargo__controls"};function X(e,C,m,i,r,s){const n=_("ScrollableContainer"),S=_("ControlsButton"),f=_("ControlsButtonContainer");return a(),o("div",{class:M(["cargo iface-container",{cargo_mobile:s.isMobile}])},[t("div",Y,[F,t("div",z,[t("div",G,[J,t("div",R,[q,t("div",H,c(s.currentState),1)])]),d(n,{class:"cargo__data",type:5},{default:b(()=>[(a(!0),o(u,null,p(r.data,(x,y)=>(a(),o("div",{class:"cargo__row",key:y},[(a(!0),o(u,null,p(x,(v,w)=>(a(),o("div",{class:"cargo__row-container",key:w},[t("div",Q,c(v.title),1),(a(!0),o(u,null,p(v.items,(l,B)=>(a(),o("div",{class:"cargo__item",key:B},[h(c(l.label),1),t("img",{class:"cargo__item-icon",src:r.icons[`/src/assets/images/cargo/icons/${l.icon}.png`]},null,8,U),h(c(l.value),1)]))),128))]))),128))]))),128))]),_:1}),t("div",W,[d(f,{text:"Закрыть"},{default:b(()=>[d(S,{text:"Alt",keyCode:r.KEY_CODE_ALT,onPressed:s.close,mobileAdaptive:s.isMobile},null,8,["keyCode","onPressed","mobileAdaptive"])]),_:1})])])])],2)}const Z=["Конфликт начат","Конфликт завершен"],$={props:["openParams"],components:{ScrollableContainer:P,ControlsButtonContainer:T,ControlsButton:L},data(){return{KEY_CODE_ALT:window.KEY_CODE_ALT,currentStateIndex:1,icons:Object.assign({"/src/assets/images/cargo/icons/0.png":D,"/src/assets/images/cargo/icons/1.png":E,"/src/assets/images/cargo/icons/2.png":I,"/src/assets/images/cargo/icons/3.png":k,"/src/assets/images/cargo/icons/4.png":O}),data:[[{title:"Прибыль",items:[{label:"Тест",icon:0,value:5},{label:"Тест",icon:0,value:5}]},{title:"Прибыль",items:[{label:"Тест",icon:1,value:5},{label:"Тест",icon:1,value:5}]}],[{title:"Прибыль",items:[{label:"Тест",icon:0,value:5},{label:"Тест",icon:0,value:5}]},{title:"Прибыль",items:[{label:"Тест",icon:1,value:5},{label:"Тест",icon:1,value:5}]},{title:"Прибыль",items:[{label:"Тест",icon:0,value:5},{label:"Тест",icon:0,value:5}]},{title:"Прибыль",items:[{label:"Тест",icon:1,value:5},{label:"Тест",icon:1,value:5},{label:"Тест",icon:1,value:5}]}]]}},computed:{currentState(){return Z[this.currentStateIndex]},isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.setState(this.openParams[0]),this.setData(this.openParams[1]))},methods:{parseData(e){return(typeof e=="string"?JSON.parse(e):e).map(m=>m.map(i=>{let r=i[0],s=i[1].map(n=>({label:n[0],icon:n[1],value:n[2]}));return{title:r,items:s}}))},setData(e){this.data=this.parseData(e)},setState(e){this.currentStateIndex=e},close(){window.closeInterface("Cargo")}}},_e=V($,[["render",X],["__scopeId","data-v-3e1ec062"]]);export{_e as default};
