import{U as Y,x as D,c as B,a0 as u,X as n,F as s,W as r,ab as _,$ as R,Y as t,I as h,a1 as b,ah as z,a2 as d,br as E,ax as F,a9 as S,G as U,a_ as j,V as A,bu as V,Z as G,bv as H,as as p,ad as v,bw as W,ar as Z,bf as q,a6 as y,bx as J,a5 as K}from"./index-B-lUZalq.js";import{C as O}from"./Container-Br6JH6Pm.js";import{T as Q}from"./Toolbar-BvxWbi_E.js";import{V as I,a as ee}from"./VRow-BQOTE9C_.js";import{b as te}from"./VBtn-BPJ1JKW-.js";import{V as ae}from"./PanelviewItemCompact-CIDxIfoQ.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ne=Y({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(k,{emit:w}){const x=k,c=D(!1),C=w,P=function(e){window.open(e,"_blank")},f=function(e,a){const i="clientX"in e?e.clientX:e.touches[0].clientX,m="clientY"in e?e.clientY:e.touches[0].clientY;K.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{M(a)}}],posX:i,posY:m})},$=function(e){return y.getProvider(e)?y.getProvider(e).name:e},L=function(e,a){P(V(a))},g=function(){c.value=!c.value},M=function(e){const a=[e];a.push(...x.modelValue.filter(i=>i!=e)),C("update:modelValue",a)},T=B(()=>[{label:"tooltip.collapse_expand",icon:c.value?"mdi-chevron-up":"mdi-chevron-down",action:g,overflowAllowed:!1}]);return(e,a)=>{const i=J("hold");return n(),u("section",se,[s(Q,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:g},null,8,["title","menu-items"]),s(R),c.value?(n(),r(O,{key:0},{default:t(()=>[(n(!0),u(h,null,b(d(q),m=>(n(),r(I,{key:m},{default:t(()=>[(n(!0),u(h,null,b(e.modelValue.filter(o=>o.type==m),(o,N)=>(n(),r(ee,{key:o.path,cols:"12",class:z(`col-${d(E)(e.$vuetify.display.width)}`)},{default:t(()=>[s(ae,null,{default:t(({props:X})=>[F((n(),r(S,U({ref_for:!0},X,{tile:"",hover:"",class:"panel-item",onClick:l=>{L(l,o)},onContextmenu:j(l=>{f(l,o)},["right","prevent"])}),{default:t(()=>[s(A,{src:d(V)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(I,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(te,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:1},8,["src"]),s(G,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(H,{width:"95%"},{default:t(()=>[p(v(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(W,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(v(e.$t("image_source")+": "+$(o.provider)),1)]),_:2},1024),N==0?(n(),r(Z,{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=>{f(l,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):_("",!0)])}}}),pe=oe(ne,[["__scopeId","data-v-d74e8be5"]]);export{pe as M};
