import{d as D,r as X,O as Y,c as u,b as s,h as r,e as b,y as j,w as t,o as n,F as h,g as V,n as z,u as d,bv as R,af as A,x as E,aB as F,b1 as S,aG as G,by as y,V as H,k as O,b5 as p,t as v,bz as U,j as q,bj as J,v as k,bA as K,p as Q}from"./index-CD7iYaFT.js";import{C as W}from"./Container-ClW3AMEw.js";import{T as Z}from"./Toolbar-B7AWyK9d.js";import{V as I,a as ee}from"./VRow-DFe5cA7D.js";import{b as te}from"./VBtn-B0XatuYF.js";import{V as ae}from"./PanelviewItemCompact-DmP5jPAL.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ne=D({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:w}){const C=f,c=X(!1),x=w,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;Q.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{T(a)}}],posX:i,posY:m})},L=function(e){return k.getProvider(e)?k.getProvider(e).name:e},M=function(e,a){P(y(a))},_=function(){c.value=!c.value},T=function(e){const a=[e];a.push(...C.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=K("hold");return n(),u("section",se,[s(Z,{title:e.$t("images"),"menu-items":$.value,onTitleClicked:_},null,8,["title","menu-items"]),s(j),c.value?(n(),r(W,{key:0},{default:t(()=>[(n(!0),u(h,null,V(d(J),m=>(n(),r(I,{key:m},{default:t(()=>[(n(!0),u(h,null,V(f.modelValue.filter(o=>o.type==m),(o,N)=>(n(),r(ee,{key:o.path,cols:"12",class:z(`col-${d(R)(e.$vuetify.display.width)}`)},{default:t(()=>[s(ae,null,{default:t(({props:B})=>[A((n(),r(E,F({ref_for:!0},B,{tile:"",hover:"",class:"panel-item",onClick:l=>{M(l,o)},onContextmenu:S(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(G,{src:d(y)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(I,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(te,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(H,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(O,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(U,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+L(o.provider)),1)]),_:2},1024),N==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)])}}}),pe=oe(ne,[["__scopeId","data-v-d74e8be5"]]);export{pe as M};
