import{aw as U,af as c,at as V,ah as n,d as e,ak as _,al as Q,ap as v,ai as a,ar as y,bj as C,bl as q,m as k,ao as S,aG as B,Q as T,ag as f,F as $,aq as I,bS as j,an as x,V as D,X as N,E as m,am as A,aj as g,aM as E,bm as F,bZ as L}from"./index.d8e1e793.js";import{Q as O}from"./QImg.dd0b3ed4.js";import{Q as P}from"./QPage.857a17e2.js";import{Q as u}from"./QSelect.6f468262.js";import{b}from"./route-block.7fdbc26a.js";import"./QChip.8b5a9737.js";import"./QMenu.3fddeb75.js";import"./rtl.87fd3dfc.js";const z={},G=a("legend",null,"Database collection",-1);function M(l,s){return c(),V(y,null,{default:n(()=>[e(_,{style:{"min-width":"400px"}},{default:n(()=>[e(Q),e(v,null,{default:n(()=>[a("fieldset",null,[G,a("div",null,[e(u,{dense:"",outlined:"",modelValue:l.model,"onUpdate:modelValue":s[0]||(s[0]=d=>l.model=d),options:l.options,label:"Users database"},null,8,["modelValue","options"]),e(u,{dense:"",outlined:"",modelValue:l.model,"onUpdate:modelValue":s[1]||(s[1]=d=>l.model=d),options:l.options,label:"Users database"},null,8,["modelValue","options"]),e(u,{dense:"",outlined:"",modelValue:l.model,"onUpdate:modelValue":s[2]||(s[2]=d=>l.model=d),options:l.options,label:"Users database"},null,8,["modelValue","options"]),e(u,{dense:"",outlined:"",modelValue:l.model,"onUpdate:modelValue":s[3]||(s[3]=d=>l.model=d),options:l.options,label:"Users database"},null,8,["modelValue","options"])])])]),_:1})]),_:1})]),_:1})}var X=U(z,[["render",M]]);const Z={class:"q-pt-md q-pa-lg"},H={class:"row justify-center"},J={class:"text-center col-12 col-md-6"},K=a("div",{class:"text-h6 q-py-md text-bold"}," Power up your Bitev with the features apps . ",-1),R={class:"row q-pt-lg q-col-gutter-md"},W={class:"col-12 col-md-6 col-lg-4"},Y={class:"q-pt-sm"},ee={__name:"index",setup(l){const s=C(),d=q(),r=k({loading:!0,search:null,apps:[...d.configs.apps]});function h(){s.dialog({component:X})}async function w(p,i,t){var o;i.config.active=t,s.loading.show(),await F.updateOne("marketplaces_local",{where:{id:p},data:{config:i.config}}).catch(),await L(),r.apps=[...(o=d.configs)==null?void 0:o.apps],s.loading.hide()}return(p,i)=>(c(),V(P,null,{default:n(()=>[e(S,{spaced:""}),a("div",Z,[a("div",H,[a("div",J,[a("div",null,[a("p",null,[e(B,{size:"lg",name:"la la-th-large"})]),K,a("p",null,[e(T,{filled:"",modelValue:r.search,"onUpdate:modelValue":i[0]||(i[0]=t=>r.search=t),type:"text",label:"Search App"},null,8,["modelValue"])])])])]),a("div",R,[(c(!0),f($,null,I(r.apps,t=>(c(),f("div",W,[e(_,{flat:"",class:"rounded-borders overflow-hidden"},{default:n(()=>[e(Q,null,{default:n(()=>[e(j,{"onUpdate:modelValue":[o=>w(t.id,t,o),o=>t.config.active=o],color:"primary",modelValue:t.config.active},null,8,["onUpdate:modelValue","modelValue"]),e(x),e(D,{onClick:o=>h(t),flat:"",icon:"mdi-cog"},{default:n(()=>[e(N,null,{default:n(()=>[m(" Conffigure ")]),_:1})]),_:2},1032,["onClick"])]),_:2},1024),e(v,{class:"text-center"},{default:n(()=>[a("div",null,[e(O,{width:"60px",src:t.config.logo},null,8,["src"])]),e(A,{class:"text-bold q-pt-sm"},{default:n(()=>{var o;return[m(g((o=t.config)==null?void 0:o.label),1)]}),_:2},1024),a("div",Y,[e(E,{lines:3},{default:n(()=>{var o;return[m(g((o=t.config)==null?void 0:o.description),1)]}),_:2},1024)])]),_:2},1024)]),_:2},1024)]))),256))])])]),_:1}))}};typeof b=="function"&&b(ee);export{ee as default};
