import{aw as B,J as X,i as Y,ax as u,ay as n,o as s,aG as r,az as _,aS as z,aD as t,ag as h,aE as y,aB as d,bs as E,bM as J,bN as V,bO as R,r as S,bJ as j,N as H,aQ as Q,ad as A,bb as F,aj as G,bP as v,b6 as K,aH as O,aK as U,bf as p,aL as I,bQ as q,aJ as W,aM as Z,aN as k,_ as ee}from"./index-BeguICWm.js";import{C as te}from"./Container-L7ytxuXf.js";import{T as ae}from"./Toolbar-DMSWIhz4.js";import{V as oe}from"./PanelviewItemCompact-YKRtLaLa.js";const se={style:{"margin-bottom":"10px"}},ne=B({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:w}){const C=f,c=X(!1),x=w,M=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:()=>{L(a)}}],posX:i,posY:m})},N=function(e){return k.getProvider(e)?k.getProvider(e).name:e},P=function(e,a){M(v(a))},b=function(){c.value=!c.value},L=function(e){const a=[e];a.push(...C.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:b,overflowAllowed:!1}]);return(e,a)=>{const i=J("hold");return n(),u("section",se,[s(ae,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:b},null,8,["title","menu-items"]),s(z),c.value?(n(),r(te,{key:0},{default:t(()=>[(n(!0),u(h,null,y(d(E),m=>(n(),r(V,{key:m},{default:t(()=>[(n(!0),u(h,null,y(f.modelValue.filter(o=>o.type==m),(o,$)=>(n(),r(R,{key:o.path,cols:"12",class:S(`col-${d(j)(e.$vuetify.display.width)}`)},{default:t(()=>[s(oe,null,{default:t(({props:D})=>[H((n(),r(Q,A({ref_for:!0},D,{tile:"",hover:"",class:"panel-item",onClick:l=>{P(l,o)},onContextmenu:F(l=>{g(l,o)},["right","prevent"])}),{default:t(()=>[s(G,{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(K,{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(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")+": "+N(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"])):_("",!0)]),_:2},1024)]),_:2},1040,["onClick","onContextmenu"])),[[i,l=>{g(l,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):_("",!0)])}}}),me=ee(ne,[["__scopeId","data-v-d74e8be5"]]);export{me as M};
