import{d as X,i as Y,N as z,c as u,o as i,b as s,e as r,q as _,p as B,w as t,F as b,r as h,E,u as d,bu as F,ae as R,n as A,aA as S,b0 as j,aF as q,bx as V,V as H,f as U,b4 as p,t as y,by as G,g as J,bi as K,m as v,bz as O,k as Q}from"./index-LFx1jIjH.js";import{C as W}from"./Container-CuH2YNr5.js";import{T as Z}from"./Toolbar-iQxHKI_C.js";import{V as k,a as ee}from"./VRow-cyJLSUM5.js";import{b as te}from"./VBtn-BYKkZzw0.js";import{V as ae}from"./PanelviewItemCompact-Bf82DAtE.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ie=X({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(I,{emit:w}){const C=I,c=Y(!1),x=w,P=function(e){window.open(e,"_blank")},f=function(e,a){const n="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:()=>{N(a)}}],posX:n,posY:m})},L=function(e){return v.getProvider(e)?v.getProvider(e).name:e},M=function(e,a){P(V(a))},g=function(){c.value=!c.value},N=function(e){const a=[e];a.push(...C.modelValue.filter(n=>n!=e)),x("update:modelValue",a)},T=z(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:g,overflowAllowed:!1}]);return(e,a)=>{const n=O("hold");return i(),u("section",se,[s(Z,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:g},null,8,["title","menu-items"]),s(B),c.value?(i(),r(W,{key:0},{default:t(()=>[(i(!0),u(b,null,h(d(K),m=>(i(),r(k,{key:m},{default:t(()=>[(i(!0),u(b,null,h(e.modelValue.filter(o=>o.type==m),(o,$)=>(i(),r(ee,{key:o.path,cols:"12",class:E(`col-${d(F)(e.$vuetify.display.width)}`)},{default:t(()=>[s(ae,null,{default:t(({props:D})=>[R((i(),r(A,S({ref_for:!0},D,{tile:"",hover:"",class:"panel-item",onClick:l=>{M(l,o)},onContextmenu:j(l=>{f(l,o)},["right","prevent"])}),{default:t(()=>[s(q,{src:d(V)(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(H,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(U,{width:"95%"},{default:t(()=>[p(y(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(G,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(y(e.$t("image_source")+": "+L(o.provider)),1)]),_:2},1024),$==0?(i(),r(J,{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"])),[[n,l=>{f(l,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):_("",!0)])}}}),pe=oe(ie,[["__scopeId","data-v-d74e8be5"]]);export{pe as M};
