import{d as B,r as X,O as Y,c as u,b as s,h as r,e as b,y as R,w as t,o as n,F as h,g as V,n as j,u as d,by as z,af as E,x as F,aD as S,b4 as A,aI as H,bB as y,V as O,k as U,b8 as p,t as v,bC as q,j as G,bm as J,v as I,bD as K,p as Q}from"./index-CoB_2BUd.js";import{C as W}from"./Container-BzMt4Ci6.js";import{T as Z}from"./Toolbar-B0keKpNj.js";import{V as k,a as ee}from"./VRow-CLgWC1Pi.js";import{b as te}from"./VBtn-hyLqVrgl.js";import{V as ae}from"./PanelviewItemCompact-B9m_eVXB.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: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;Q.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{M(a)}}],posX:i,posY:m})},D=function(e){return I.getProvider(e)?I.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)},T=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":T.value,onTitleClicked:_},null,8,["title","menu-items"]),s(R),c.value?(n(),r(W,{key:0},{default:t(()=>[(n(!0),u(h,null,V(d(J),m=>(n(),r(k,{key:m},{default:t(()=>[(n(!0),u(h,null,V(f.modelValue.filter(o=>o.type==m),(o,$)=>(n(),r(ee,{key:o.path,cols:"12",class:j(`col-${d(z)(e.$vuetify.display.width)}`)},{default:t(()=>[s(ae,null,{default:t(({props:N})=>[E((n(),r(F,S({ref_for:!0},N,{tile:"",hover:"",class:"panel-item",onClick:l=>{L(l,o)},onContextmenu:A(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(H,{src:d(y)(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(te,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(O,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(U,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(q,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+D(o.provider)),1)]),_:2},1024),$==0?(n(),r(G,{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};
