import{d as o,t as s}from"./preload-helper-DadE4qT2.chunk.mjs";import{N as i}from"./NcActionButton-DykQxmXJ-BQWCX8rI.chunk.mjs";import{S as r,a,n as l}from"./icons-CFZwNZD8.chunk.mjs";const c=o({name:"ActionFavorite",components:{Star:a,StarOutline:r,NcActionButton:i},props:{selectedFileIds:{type:Array,required:!0}},computed:{files(){return this.$store.state.files.files},shouldFavoriteSelection(){return this.selectedFileIds.some(t=>this.files[t].attributes.favorite===0)}},methods:{async favoriteSelection(){await this.$store.dispatch("toggleFavoriteForFiles",{fileIds:this.selectedFileIds,favoriteState:1})},async unFavoriteSelection(){await this.$store.dispatch("toggleFavoriteForFiles",{fileIds:this.selectedFileIds,favoriteState:0})},t:s}});var n=function(){var t=this,e=t._self._c;return t._self._setupProxy,t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[t._v(" "+t._s(t.t("photos","Add selection to favorites"))+" "),e("StarOutline",{attrs:{slot:"icon"},slot:"icon"})],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[t._v(" "+t._s(t.t("photos","Remove selection from favorites"))+" "),e("Star",{attrs:{slot:"icon"},slot:"icon"})],1)},f=[],v=l(c,n,f,!1,null,null);const h=v.exports;export{h as A};
//# sourceMappingURL=ActionFavorite-BzEZT0XX.chunk.mjs.map
