import{M as v}from"./MkPagination-DzUgufpZ.js";import{aA as x,b as t,a9 as P,j as S,P as A,_ as B}from"./app-QjDgb7aF.js";import{b as D,E as n,j as s,g as d,i as e,k as o,q as i,p as u,F as N,G as q,D as c,H as w,u as H,a as V,f as _}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const j={class:"qtcaoidl"},E={key:0,class:"description"},F=D({__name:"index",setup(I){const m={endpoint:"clips/list",limit:10},l=V();async function f(){const{canceled:r,result:p}=await S(t.ts.createNewClip,{name:{type:"string",label:t.ts.name},description:{type:"string",required:!1,multiline:!0,label:t.ts.description},isPublic:{type:"boolean",label:t.ts.public,default:!1}});r||(A("clips/create",p),l.value.reload())}const k=_(()=>[]),g=_(()=>[]);return x({title:t.ts.clip,icon:"ph-paperclip ph-bold ph-lg",action:{icon:"ph-plus ph-bold ph-lg",handler:f}}),(r,p)=>{const b=n("MkPageHeader"),h=n("MkA"),y=n("MkSpacer"),M=n("MkStickyContainer");return s(),d(M,null,{header:e(()=>[o(b,{actions:k.value,tabs:g.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:e(()=>[o(y,{"content-max":700},{default:e(()=>[i("div",j,[o(v,{ref_key:"pagingComponent",ref:l,pagination:m,class:"list"},{empty:e(()=>[o(P,{icon:"paperclip",card:!0},{default:e(()=>[i("p",null,c(H(t).ts.clipsDesc),1)]),_:1})]),default:e(({items:C})=>[(s(!0),u(N,null,q(C,a=>(s(),d(h,{key:a.id,to:`/clips/${a.id}`,class:"item _panel _gap"},{default:e(()=>[i("b",null,c(a.name),1),a.description?(s(),u("div",E,c(a.description),1)):w("",!0)]),_:2},1032,["to"]))),128))]),_:1},512)])]),_:1})]),_:1})}}}),z=B(F,[["__scopeId","data-v-ffab3981"]]);export{z as default};
//# sourceMappingURL=index-c2sPYvHT.js.map
