import{ay as X,J as B,i as Y,az as u,aA as n,o as s,aI as r,aB as h,aV as z,aG as t,ah as V,aH as b,aD as d,bv as R,b$ as A,c0 as y,c1 as E,r as H,bX as J,N as S,aT as j,ae as F,be as G,am as O,c2 as v,b9 as U,aJ as q,aM as K,bi as p,aN as I,c3 as Q,aL as W,aO as Z,aP as k,_ as ee}from"./index-D-FY8Yx2.js";import{C as te}from"./Container-C7DumkgJ.js";import{T as ae}from"./Toolbar-CxAnowGj.js";import{V as oe}from"./PanelviewItemCompact-BY3CNldl.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;Z.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{N(a)}}],posX:i,posY:m})},L=function(e){return k.getProvider(e)?k.getProvider(e).name:e},M=function(e,a){P(v(a))},_=function(){c.value=!c.value},N=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=A("hold");return n(),u("section",se,[s(ae,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:_},null,8,["title","menu-items"]),s(z),c.value?(n(),r(te,{key:0},{default:t(()=>[(n(!0),u(V,null,b(d(R),m=>(n(),r(y,{key:m},{default:t(()=>[(n(!0),u(V,null,b(f.modelValue.filter(o=>o.type==m),(o,$)=>(n(),r(E,{key:o.path,cols:"12",class:H(`col-${d(J)(e.$vuetify.display.width)}`)},{default:t(()=>[s(oe,null,{default:t(({props:D})=>[S((n(),r(j,F({ref_for:!0},D,{tile:"",hover:"",class:"panel-item",onClick:l=>{M(l,o)},onContextmenu:G(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(O,{src:d(v)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(y,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(U,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(q,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(K,{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")+": "+L(o.provider)),1)]),_:2},1024),$==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"])):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)])}}}),me=ee(ne,[["__scopeId","data-v-d74e8be5"]]);export{me as M};
