import{ay as B,J as R,i as S,az as u,aA as n,o as s,aI as r,aB as h,aU as X,aG as t,ah as _,aH as y,aD as d,bu as Y,bO as z,bP as V,bQ as A,r as E,bL as H,N as J,aS as O,ae as U,bd as j,am as F,bR as v,b8 as G,aJ as Q,aM as q,bh as p,aN as I,bS as K,aL as W,aO as Z,aP as k,_ as ee}from"./index-BRUnowC8.js";import{C as te}from"./Container-ZHtGcXZO.js";import{T as ae}from"./Toolbar-BEJzY0mB.js";import{V as oe}from"./PanelviewItemCompact-CsJmi5IT.js";const se={style:{"margin-bottom":"10px"}},ne=B({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:C}){const w=f,c=R(!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))},b=function(){c.value=!c.value},N=function(e){const a=[e];a.push(...w.modelValue.filter(i=>i!=e)),x("update:modelValue",a)},T=S(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:b,overflowAllowed:!1}]);return(e,a)=>{const i=z("hold");return n(),u("section",se,[s(ae,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:b},null,8,["title","menu-items"]),s(X),c.value?(n(),r(te,{key:0},{default:t(()=>[(n(!0),u(_,null,y(d(Y),m=>(n(),r(V,{key:m},{default:t(()=>[(n(!0),u(_,null,y(f.modelValue.filter(o=>o.type==m),(o,$)=>(n(),r(A,{key:o.path,cols:"12",class:E(`col-${d(H)(e.$vuetify.display.width)}`)},{default:t(()=>[s(oe,null,{default:t(({props:D})=>[J((n(),r(O,U({ref_for:!0},D,{tile:"",hover:"",class:"panel-item",onClick:l=>{M(l,o)},onContextmenu:j(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(F,{src:d(v)(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(Q,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(q,{width:"95%"},{default:t(()=>[p(I(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(K,{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};
