import{I as s}from"./iconify-p99pbjf9.js";import{d as k,g as c,A as r,H as _,J as i,P as g,j as e,t as a,B as l,aH as v,C as B,O as C,e as S,c as M,aI as w,h as y}from"./index-DOFLUERq.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";const I={class:"shortcut-text"},N={key:0,class:"shortcut-actions"},$=["title"],V=["title"],z=["title"],D=k({__name:"ShortcutBlock",props:{title:{},shortcutData:{},editMode:{type:Boolean}},emits:["edit","delete"],setup(n,{emit:d}){const u=d,m=S(),p=M(()=>[{label:a("Delete"),key:"delete",icon:()=>y(s,{icon:"tabler:trash",size:16})}]);function f(t){if(t){if(t.url)window.open(t.url,"_blank");else if(t.link_to){const o=w(t.link_to);m.push(`/app/${o}`)}}}function h(t){t==="delete"&&u("delete")}return(t,o)=>(c(),r("div",{class:_(["shortcut",{"edit-mode":n.editMode}])},[i("div",{class:"shortcut-content",onClick:o[0]||(o[0]=b=>!n.editMode&&f(n.shortcutData))},[i("span",I,g(e(a)(n.title)),1),l(e(s),{class:"shortcut-icon",icon:"tabler:arrow-up-right"})]),n.editMode?(c(),r("div",N,[i("button",{class:"action-btn",onClick:o[1]||(o[1]=b=>t.$emit("edit")),title:e(a)("Edit")},[l(e(s),{icon:"tabler:edit"})],8,$),i("button",{class:"action-btn drag-handle",title:e(a)("Drag")},[l(e(s),{icon:"tabler:grip-vertical"})],8,V),l(e(v),{trigger:"click",options:p.value,onSelect:h},{default:B(()=>[i("button",{class:"action-btn",title:e(a)("More")},[l(e(s),{icon:"tabler:dots"})],8,z)]),_:1},8,["options"])])):C("",!0)],2))}}),T=x(D,[["__scopeId","data-v-7faca562"]]);export{T as default};
