import{d as X,c as u,J as s,G as r,K as h,g as Y,r as B,H as t,F as y,P as V,ae as F,u as d,f as H,D as R,N as S,a2 as p,a4 as v,bb as j,b as n}from"./lucide-DMa8pBeQ.js";import{C as z}from"./Container-DpRG4AkK.js";import{H as E,g as I,I as A,a as b,e as G,_ as J}from"./index-B1IzS8gl.js";import{T as K}from"./Toolbar-DGXQ_w0A.js";import{e as Q,i as k,j as U,a as q,F as O,k as W,c as Z,Q as ee,R as te,d as ae,S as oe}from"./vuetify-CbR4Ou0u.js";const se={style:{"margin-bottom":"10px"}},ne=X({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:C}){const w=f,c=B(!1),x=C,P=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;G.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{T(a)}}],posX:i,posY:m})},M=function(e){return b.getProvider(e)?b.getProvider(e).name:e},N=function(e,a){P(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)},$=Y(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:_,overflowAllowed:!1}]);return(e,a)=>{const i=j("hold");return n(),u("section",se,[s(K,{title:e.$t("images"),"menu-items":$.value,onTitleClicked:_},null,8,["title","menu-items"]),s(Q),c.value?(n(),r(z,{key:0},{default:t(()=>[(n(!0),u(y,null,V(d(A),m=>(n(),r(k,{key:m},{default:t(()=>[(n(!0),u(y,null,V(f.modelValue.filter(o=>o.type==m),(o,D)=>(n(),r(U,{key:o.path,cols:"12",class:F(`col-${d(E)(e.$vuetify.display.width)}`)},{default:t(()=>[s(oe,null,{default:t(({props:L})=>[H((n(),r(q,R({ref_for:!0},L,{tile:"",hover:"",class:"panel-item",onClick:l=>{N(l,o)},onContextmenu:S(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(O,{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(W,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(Z,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(ee,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(te,{class:"ma-line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+M(o.provider)),1)]),_:2},1024),D==0?(n(),r(ae,{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=J(ne,[["__scopeId","data-v-89e5c888"]]);export{ue as M};
