import{a7 as D,F as X,i as B,a8 as u,a9 as n,o as s,ai as r,aa as b,au as R,ae as t,a0 as h,af as V,ac as d,b6 as j,bq as z,br as v,bs as E,r as F,bn as S,bt as q,as as A,Y as H,aP as K,a4 as U,bu as y,aK as G,aj as J,am as O,aT as p,an as I,bv as Q,al as W,ao as Z,ap as k,_ as ee}from"./index-CFcIX8RO.js";import{C as te}from"./Container-iGBsqgnx.js";import{T as ae}from"./Toolbar-DambSy-S.js";import{V as oe}from"./PanelviewItemCompact-YHP34gKS.js";const se={style:{"margin-bottom":"10px"}},ne=D({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:C}){const w=f,c=X(!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;Z.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{M(a)}}],posX:i,posY:m})},T=function(e){return k.getProvider(e)?k.getProvider(e).name:e},L=function(e,a){P(y(a))},_=function(){c.value=!c.value},M=function(e){const a=[e];a.push(...w.modelValue.filter(i=>i!=e)),x("update:modelValue",a)},$=B(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:_,overflowAllowed:!1}]);return(e,a)=>{const i=z("hold");return n(),u("section",se,[s(ae,{title:e.$t("images"),"menu-items":$.value,onTitleClicked:_},null,8,["title","menu-items"]),s(R),c.value?(n(),r(te,{key:0},{default:t(()=>[(n(!0),u(h,null,V(d(j),m=>(n(),r(v,{key:m},{default:t(()=>[(n(!0),u(h,null,V(f.modelValue.filter(o=>o.type==m),(o,N)=>(n(),r(E,{key:o.path,cols:"12",class:F(`col-${d(S)(e.$vuetify.display.width)}`)},{default:t(()=>[s(oe,null,{default:t(({props:Y})=>[q((n(),r(A,H({ref_for:!0},Y,{tile:"",hover:"",class:"panel-item",onClick:l=>{L(l,o)},onContextmenu:K(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(U,{src:d(y)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(v,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(G,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(J,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(O,{width:"95%"},{default:t(()=>[p(I(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(Q,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(I(e.$t("image_source")+": "+T(o.provider)),1)]),_:2},1024),N==0?(n(),r(W,{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"])):b("",!0)]),_:2},1024)]),_:2},1040,["onClick","onContextmenu"])),[[i,l=>{g(l,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):b("",!0)])}}}),me=ee(ne,[["__scopeId","data-v-d74e8be5"]]);export{me as M};
