import{d as X,r as Y,c as A,b as u,e as n,H as s,D as r,I as h,E as t,F as y,M as V,u as d,aR as B,ad as E,g as R,A as j,O as z,$ as p,a1 as v}from"./lucide-C2DU1LFb.js";import{C as F}from"./Container-CwfZ2VgM.js";import{I as H,y as S,A as I,e as U,c as b,_ as O}from"./index-CxiRlsCY.js";import{T as W}from"./Toolbar-MwYpbj3t.js";import{e as q,j as k,k as G,U as J,a as K,C as Q,l as Z,c as ee,W as te,X as ae,d as oe}from"./vuetify-RelkxOq-.js";const se={style:{"margin-bottom":"10px"}},ne=X({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:C}){const w=f,c=Y(!1),x=C,M=function(e){window.open(e,"_blank")},g=function(e,a){const i="clientX"in e?e.clientX:e.touches[0].clientX,m="clientY"in e?e.clientY:e.touches[0].clientY;U.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{T(a)}}],posX:i,posY:m})},P=function(e){return b.getProvider(e)?b.getProvider(e).name:e},$=function(e,a){M(I(a))},_=function(){c.value=!c.value},T=function(e){const a=[e];a.push(...w.modelValue.filter(i=>i!=e)),x("update:modelValue",a)},D=A(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:_,overflowAllowed:!1}]);return(e,a)=>{const i=B("hold");return n(),u("section",se,[s(W,{title:e.$t("images"),"menu-items":D.value,onTitleClicked:_},null,8,["title","menu-items"]),s(q),c.value?(n(),r(F,{key:0},{default:t(()=>[(n(!0),u(y,null,V(d(H),m=>(n(),r(k,{key:m},{default:t(()=>[(n(!0),u(y,null,V(f.modelValue.filter(o=>o.type==m),(o,L)=>(n(),r(G,{key:o.path,cols:"12",class:E(`col-${d(S)(e.$vuetify.display.width)}`)},{default:t(()=>[s(J,null,{default:t(({props:N})=>[R((n(),r(K,j({ref_for:!0},N,{tile:"",hover:"",class:"panel-item",onClick:l=>{$(l,o)},onContextmenu:z(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(Q,{src:d(I)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(k,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(Z,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(ee,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(te,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(ae,{class:"ma-line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+P(o.provider)),1)]),_:2},1024),L==0?(n(),r(oe,{key:0,size:"x-large",style:{position:"absolute",right:"0",bottom:"5px"},color:"orange",title:e.$t("tooltip.primary_image")},{default:t(()=>[...a[0]||(a[0]=[p("mdi-star-box",-1)])]),_:1},8,["title"])):h("",!0)]),_:2},1024)]),_:2},1040,["onClick","onContextmenu"])),[[i,l=>{g(l,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):h("",!0)])}}}),ue=O(ne,[["__scopeId","data-v-d132eb95"]]);export{ue as M};
