import{M as v}from"./MkPagination-urywMrXv.js";import{a4 as x,i as t,an as P,q as S,P as B,n as D}from"./app-JmgyQoR0.js";import{b as N,a as q,c as d,D as n,h as s,i as u,j as e,l as o,u as c,E as i,z as w,t as _,G as A,H,F as V}from"./vue-y3KLWBaS.js";const E={class:"qtcaoidl"},F={key:0,class:"description"},I=N({__name:"index",setup(j){const m={endpoint:"clips/list",limit:10},l=q();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||(B("clips/create",p),l.value.reload())}const k=d(()=>[]),g=d(()=>[]);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 h=n("MkPageHeader"),b=n("MkA"),y=n("MkSpacer"),M=n("MkStickyContainer");return s(),u(M,null,{header:e(()=>[o(h,{actions:k.value,tabs:g.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:e(()=>[o(y,{"content-max":700},{default:e(()=>[c("div",E,[o(v,{ref_key:"pagingComponent",ref:l,pagination:m,class:"list"},{empty:e(()=>[o(P,{icon:"paperclip",card:!0},{default:e(()=>[c("p",null,i(w(t).ts.clipsDesc),1)]),_:1})]),default:e(({items:C})=>[(s(!0),_(V,null,A(C,a=>(s(),u(b,{key:a.id,to:`/clips/${a.id}`,class:"item _panel _gap"},{default:e(()=>[c("b",null,i(a.name),1),a.description?(s(),_("div",F,i(a.description),1)):H("",!0)]),_:2},1032,["to"]))),128))]),_:1},512)])]),_:1})]),_:1})}}}),T=D(I,[["__scopeId","data-v-d21dc04f"]]);export{T as default};
