import{d as Y,r as z,z as B,R as D,c as i,g as d,f as a,e as r,w as t,F as g,h,u,j as V,ac as N,_ as R,Q as X,G as j,a4 as A,Y as p,t as y,b as E}from"./index-e34071c2.js";import{p as F,n as v}from"./VCheckbox-081529bb.js";import{C as S}from"./Container-1af89f37.js";import{T as G}from"./Toolbar-bbf3d11a.js";import{e as H}from"./eventbus-edb4a70e.js";import{V as Q}from"./VList-5a526902.js";import{V as I,a as U}from"./ItemsListing-e7c9377b.js";import{V as q}from"./PanelviewItemCompact-8de8744a.js";import{V as J}from"./VCard-0f63f60c.js";import{z as K,y as O,V as W,A as Z,B as ee,w as te}from"./VListItem-6fb16d04.js";import{_ as oe}from"./_plugin-vue_export-helper-c27b6911.js";const ae={style:{"margin-bottom":"10px"}},se=Y({__name:"MediaItemImages",props:{modelValue:{}},emits:["update:modelValue"],setup(k,{emit:w}){const b=k,m=z(!1),C=w,x=function(e){window.open(e,"_blank")},f=function(e,n){const l="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:()=>{L(n)}}],posX:l,posY:c})},M=function(e,n){x(v(n))},_=function(){m.value=!m.value},L=function(e){console.log("MakeImagePrimary",e);const n=[e];n.push(...b.modelValue.filter(l=>l!=e)),C("update:modelValue",n)},P=B(()=>[{label:"tooltip.collapse_expand",icon:m.value?"mdi-chevron-up":"mdi-chevron-down",action:_,overflowAllowed:!1}]);return(e,n)=>{const l=D("hold");return i(),d("section",ae,[a(G,{title:e.$t("images"),"menu-items":P.value,onTitleClicked:_},null,8,["title","menu-items"]),a(Q),m.value?(i(),r(S,{key:0},{default:t(()=>[(i(!0),d(g,null,h(u(N),c=>(i(),r(I,{key:c},{default:t(()=>[(i(!0),d(g,null,h(e.modelValue.filter(o=>o.type==c),(o,T)=>(i(),r(U,{key:o.path,cols:"12",class:R(`col-${u(F)(e.$vuetify.display.width)}`)},{default:t(()=>[a(q,null,{default:t(({props:$})=>[X((i(),r(J,j({ref_for:!0},$,{tile:"",hover:"",class:"panel-item",onClick:s=>{M(s,o)},onContextmenu:A(s=>{f(s,o)},["right","prevent"])}),{default:t(()=>[a(K,{src:u(v)(o,256),class:"bg-grey-lighten-2",width:"100%"},{placeholder:t(()=>[a(I,{align:"center",class:"fill-height ma-0",justify:"center"},{default:t(()=>[a(O,{color:"grey-lighten-5",indeterminate:""})]),_:1})]),_:2},1032,["src"]),a(W,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[a(Z,{width:"95%"},{default:t(()=>[p(y(e.$t("image_type")+": "+o.type),1)]),_:2},1024),a(ee,{class:"line-clamp-1",style:{"margin-right":"25px"}},{default:t(()=>{var s;return[p(y(e.$t("image_source")+": "+((s=u(E).getProvider(o.provider))==null?void 0:s.name)),1)]}),_:2},1024),T==0?(i(),r(te,{key:0,size:"x-large",style:{position:"absolute",right:"0",bottom:"5px"},color:"orange",title:e.$t("tooltip.primary_image")},{default:t(()=>[p("mdi-star-box")]),_:1},8,["title"])):V("",!0)]),_:2},1024)]),_:2},1040,["onClick","onContextmenu"])),[[l,s=>{f(s,o)}]])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})):V("",!0)])}}});const ge=oe(se,[["__scopeId","data-v-27d7dcf5"]]);export{ge as M};
