import{Q as X,x as Y,c as B,Z as u,B as s,R as r,a9 as _,Y as R,U as t,S as n,G as h,$ as V,a0 as d,bc as S,aH as z,as as E,bp as G,aG as H,a7 as U,D as j,aW as A,V as F,bs as b,X as Q,bt as W,ao as p,ab as y,bu as Z,an as q,a3 as J,a4 as v}from"./index-DHdZ3kUo.js";import{C as K}from"./Container-Df6fHx0a.js";import{T as O}from"./Toolbar-D2EfoAlR.js";import{V as I,a as ee}from"./VRow-CwPnZM2-.js";import{V as te}from"./PanelviewItemCompact-776c11Dw.js";import{b as ae}from"./VBtn-DqyIv1Wk.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ne=X({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(k,{emit:C}){const w=k,c=Y(!1),x=C,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;J.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{M(a)}}],posX:i,posY:m})},$=function(e){return v.getProvider(e)?v.getProvider(e).name:e},L=function(e,a){P(b(a))},g=function(){c.value=!c.value},M=function(e){const a=[e];a.push(...w.modelValue.filter(i=>i!=e)),x("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=z("hold");return n(),u("section",se,[s(O,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:g},null,8,["title","menu-items"]),s(R),c.value?(n(),r(K,{key:0},{default:t(()=>[(n(!0),u(h,null,V(d(S),m=>(n(),r(I,{key:m},{default:t(()=>[(n(!0),u(h,null,V(e.modelValue.filter(o=>o.type==m),(o,D)=>(n(),r(ee,{key:o.path,cols:"12",class:E(`col-${d(G)(e.$vuetify.display.width)}`)},{default:t(()=>[s(te,null,{default:t(({props:N})=>[H((n(),r(U,j({ref_for:!0},N,{tile:"",hover:"",class:"panel-item",onClick:l=>{L(l,o)},onContextmenu:A(l=>{f(l,o)},["right","prevent"])}),{default:t(()=>[s(F,{src:d(b)(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(ae,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:2},1032,["src"]),s(Q,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(W,{width:"95%"},{default:t(()=>[p(y(e.$t("image_type")+": "+o.type),1)]),_:2},1024),s(Z,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(y(e.$t("image_source")+": "+$(o.provider)),1)]),_:2},1024),D==0?(n(),r(q,{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},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-d446f2e1"]]);export{pe as M};
