import{av as B,H as E,r as H,aw as u,x as s,aD as r,ay as b,aQ as X,aB as t,ax as n,ag as h,aC as V,e as Y,az as d,bE as z,L as R,aO as j,ad as S,b8 as A,aj as F,bH as y,b3 as G,aE as J,aH as K,bc as p,aI as v,bI as O,aG as Q,bp as U,aL as I,bJ as q,aK as W}from"./index-C-Ivu3jU.js";import{C as Z}from"./Container-DVyc_Yt_.js";import{T as ee}from"./Toolbar-CLPRlZ-4.js";import{V as C,a as te}from"./VRow-DOG0WeJD.js";import{V as ae}from"./PanelviewItemCompact-5_ppRL3T.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ne=B({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:k}){const w=f,c=E(!1),x=k,L=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;W.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{T(a)}}],posX:i,posY:m})},P=function(e){return I.getProvider(e)?I.getProvider(e).name:e},M=function(e,a){L(y(a))},_=function(){c.value=!c.value},T=function(e){const a=[e];a.push(...w.modelValue.filter(i=>i!=e)),x("update:modelValue",a)},$=H(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:_,overflowAllowed:!1}]);return(e,a)=>{const i=q("hold");return n(),u("section",se,[s(ee,{title:e.$t("images"),"menu-items":$.value,onTitleClicked:_},null,8,["title","menu-items"]),s(X),c.value?(n(),r(Z,{key:0},{default:t(()=>[(n(!0),u(h,null,V(d(U),m=>(n(),r(C,{key:m},{default:t(()=>[(n(!0),u(h,null,V(f.modelValue.filter(o=>o.type==m),(o,D)=>(n(),r(te,{key:o.path,cols:"12",class:Y(`col-${d(z)(e.$vuetify.display.width)}`)},{default:t(()=>[s(ae,null,{default:t(({props:N})=>[R((n(),r(j,S({ref_for:!0},N,{tile:"",hover:"",class:"panel-item",onClick:l=>{M(l,o)},onContextmenu:A(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(F,{src:d(y)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(C,{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(K,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(O,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+P(o.provider)),1)]),_:2},1024),D==0?(n(),r(Q,{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)])}}}),de=oe(ne,[["__scopeId","data-v-d74e8be5"]]);export{de as M};
