import{h as f,f as p}from"./time4.js";import{c}from"./timeZone.js";import{o as r,h as q,w,a as t,n as E,t as o,c as d,f as l,F as v,i as T,d as y,T as S,_ as R}from"./index.js";const g={class:"unanswered-requests__date"},M={class:"unanswered-requests__date-time"},b={class:"unanswered-requests__date-years"},x={class:"unanswered-requests__list"},k={key:0,class:"unanswered-requests__list-shadow"};function A(e,i,n,u,s,a){return r(),q(S,{name:"fade"},{default:w(()=>[t("div",{class:E(["unanswered-requests iface-container",{"unanswered-requests_mobile":a.isMobile}])},[t("div",g,[t("div",M,o(a.formatDate(s.date)),1),t("div",b,o(a.formatTime(s.date)),1)]),t("div",x,[a.isEditableMode?l("",!0):(r(),d("div",k)),s.requests.length>0?(r(!0),d(v,{key:1},T(s.requests,(_,h)=>(r(),d("div",{class:"unanswered-requests__item",style:y({color:_.isAdmin?"#FF683C":"#fff"}),key:h},o(_.index),5))),128)):l("",!0)])],2)]),_:1})}const m={REQUESTS:0,TIME:1},C={props:["openParams"],data(){return{requests:[],date:c(new Date)}},computed:{isMobile(){return this.$root.isMobile},isEditableMode(){return this.$store.getters["settings/settings"].isControlsEditable}},created(){this.$data.noAdaptation=!0,this.openParams&&this.setRequests(this.openParams)},methods:{formatDate:f,formatTime:p,setRequests(e){this.requests=[];let i=typeof e=="string"?JSON.parse(e):e;for(var n of i[m.REQUESTS])this.requests.push({index:n[0],isAdmin:n[1]});this.requests.sort((u,s)=>s.isAdmin-u.isAdmin),this.updateTime(i[m.TIME])},updateTime(e){this.date=c(new Date(e*1e3))}}},N=R(C,[["render",A],["__scopeId","data-v-536d058d"]]);export{N as default};
