/*! third party licenses: js/vendor.LICENSE.txt */ import{e as i}from"./index-CptUZ5kX.chunk.mjs";import{s as o}from"./useModelMigration-DBUi8saj-3MwaDfgr.chunk.mjs";import{T as n,g as d}from"./guests-init.mjs";import"./logger-B6CRpC7D.chunk.mjs";import"./Nextcloud-CHzevblG.chunk.mjs";const h={icon:"icon-guests",displayName:t("guests","Invite guest"),shareType:n.SHARE_TYPE_GUEST,handler:async e=>{const r=e.suggestions.find(s=>s.isNoUser===!1&&s.shareType===0);return new Promise((s,a)=>{r?(o(t("guests","A user with this ID or email address already exists")),a(new Error("Impossible to create guest, a user with this ID or email address already exists"))):s(d.populate(e.fileInfo,e.query))})},condition:e=>i.validate(e.query)};window.addEventListener("DOMContentLoaded",()=>{OCA.Sharing&&OCA.Sharing.ShareSearch?OCA.Sharing.ShareSearch.addNewResult(h):console.error("OCA.Sharing.ShareSearch not ready")}); //# sourceMappingURL=guests-main.mjs.map