import{x as E,r as X,c as Y,D as u,l as s,y as r,J as _,A as t,z as i,F as V,E as h,G as d,aq as z,aa as B,W as R,ax as S,a9 as A,m as F,a2 as j,S as p,K as y,I as v}from"./index-DKhfhZyI.js";import{e as I}from"./ItemContextMenu.vue_vue_type_style_index_0_scoped_cee6bfa4_lang-BEm2OpTr.js";import{C as q}from"./Container-DdZvDMit.js";import{T as G}from"./Toolbar-DfTAf723.js";import{e as H}from"./eventbus-CGRXT3Tn.js";import{V as J}from"./VList-BsIdJYb-.js";import{V as k,a as K}from"./VRow-C3_3R0pl.js";import{V as U}from"./PanelviewItemCompact-BXu7orP5.js";import{V as W}from"./VCard-AQsAsy9j.js";import{V as O,C as Q,k as Z,D as ee,E as te,w as oe}from"./VListItem-DG7fZYqG.js";import{_ as ae}from"./_plugin-vue_export-helper-DlAUqK2U.js";const se={style:{"margin-bottom":"10px"}},ie=E({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(C,{emit:w}){const b=C,m=X(!1),x=w,P=function(e){window.open(e,"_blank")},f=function(e,o){const n="clientX"in e?e.clientX:e.touches[0].clientX,c="clientY"in e?e.clientY:e.touches[0].clientY;H.emit("contextmenu",{items:[{label:"image_make_primary",icon:"mdi-star-box",action:()=>{M(o)}}],posX:n,posY:c})},D=function(e){return v.getProvider(e)?v.getProvider(e).name:e},L=function(e,o){P(I(o))},g=function(){m.value=!m.value},M=function(e){const o=[e];o.push(...b.modelValue.filter(n=>n!=e)),x("update:modelValue",o)},T=Y(()=>[{label:"tooltip.collapse_expand",icon:m.value?"mdi-chevron-up":"mdi-chevron-down",action:g,overflowAllowed:!1}]);return(e,o)=>{const n=B("hold");return i(),u("section",se,[s(G,{title:e.$t("images"),"menu-items":T.value,onTitleClicked:g},null,8,["title","menu-items"]),s(J),m.value?(i(),r(q,{key:0},{default:t(()=>[(i(!0),u(V,null,h(d(z),c=>(i(),r(k,{key:c},{default:t(()=>[(i(!0),u(V,null,h(e.modelValue.filter(a=>a.type==c),(a,$)=>(i(),r(K,{key:a.path,cols:"12",class:R(`col-${d(S)(e.$vuetify.display.width)}`)},{default:t(()=>[s(U,null,{default:t(({props:N})=>[A((i(),r(W,F({ref_for:!0},N,{tile:"",hover:"",class:"panel-item",onClick:l=>{L(l,a)},onContextmenu:j(l=>{f(l,a)},["right","prevent"])}),{default:t(()=>[s(O,{src:d(I)(a,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[s(k,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[s(Q,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:2},1032,["src"]),s(Z,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[s(ee,{width:"95%"},{default:t(()=>[p(y(e.$t("image_type")+": "+a.type),1)]),_:2},1024),s(te,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>[p(y(e.$t("image_source")+": "+D(a.provider)),1)]),_:2},1024),$==0?(i(),r(oe,{key:0,size:"x-large",style:{position:"absolute",right:"0",bottom:"5px"},color:"orange",title:e.$t("tooltip.primary_image")},{default:t(()=>o[0]||(o[0]=[p("mdi-star-box")])),_:1},8,["title"])):_("",!0)]),_:2},1024)]),_:2},1040,["onClick","onContextmenu"])),[[n,l=>{f(l,a)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):_("",!0)])}}}),Ve=ae(ie,[["__scopeId","data-v-d446f2e1"]]);export{Ve as M};
