import{t as a,_ as e,V as s,a as r,h as n}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{f as i,N as p,h as d,l as m,p as h}from"./index-BMeBqg0T.chunk.mjs";import{N as c}from"./NcEmptyContent-C3BLUUdi.chunk.mjs";import{I as l,n as y}from"./icons-VGG7keIQ.chunk.mjs";import{F as u}from"./FileComponent-Z0cvFFM3.chunk.mjs";import{g as f}from"./PhotoSearch-DdDD9daK.chunk.mjs";import"./index-XmYygNaN.chunk.mjs";import"./NcCheckboxRadioSwitch-VeztTzpz-CXqdOpK4.chunk.mjs";import"./useModelMigration-EhAWvqDD-wVDp4GUR.chunk.mjs";const g={name:"DashboardOnThisDay",components:{FileComponent:u,NcButton:p,NcLoadingIcon:i,NcEmptyContent:c,ImageOutlineIcon:l},data(){return{loading:!0,items:[]}},computed:{moreUrl(){return e("/apps/photos/thisday")}},async created(){try{this.items=await f({firstResult:0,nbResults:1,mimesType:d,onThisDay:!0})}catch(t){m.error("Failed to load on this day pictures",{error:t})}finally{this.loading=!1}},methods:{t:a}};var w=function(){var t=this,o=t._self._c;return o("div",{staticClass:"on-this-day-dashboard"},[t.loading?o("NcLoadingIcon",{attrs:{size:48}}):t.items.length===0?o("NcEmptyContent",{attrs:{name:t.t("photos","No picture for this day"),description:t.t("photos","Picture taken on this day will show up here.")},scopedSlots:t._u([{key:"icon",fn:function(){return[o("ImageOutlineIcon")]},proxy:!0}])}):[o("FileComponent",{staticClass:"on-this-day-dashboard__file",attrs:{file:t.items[0],"allow-selection":!1}}),o("NcButton",{attrs:{href:t.moreUrl}},[t._v(" "+t._s(t.t("photos","More photos from this day"))+" ")])]],2)},N=[],C=y(g,w,N,!1,null,"4ab77429");const _=C.exports;s.prototype.t=a,s.prototype.n=r,window.addEventListener("DOMContentLoaded",()=>{window.OCA.Dashboard.register("photos-onthisday",t=>{n.PhotosOnThisDay=new s({el:t,store:h,render:o=>o(_)})})}); //# sourceMappingURL=photos-dashboard.mjs.map