import{j as s,o,k as i,l as I,t as l,z as L,b as Y,c as w,w as r,e as u,u as e,p as _,r as z,g as f,F as Z,D as J,h as W}from"./runtime-dom.esm-bundler-CnPoR0UW.chunk.mjs";import{d as H}from"./index-C1xmmKTZ-Dc_rYBq-.chunk.mjs";import{a as M,l as h}from"./index-BgmsSgl5.chunk.mjs";import{t as a}from"./translation-DoG5ZELJ-DFt3Gk_P.chunk.mjs";import{j as x}from"./createElementId-DhjFt1I9-Cdw8hg_s.chunk.mjs";import{N as b}from"./logger-D3RVzcfQ-v2acROFG.chunk.mjs";import{N as q}from"./TrashCanOutline-DGTAXxb4.chunk.mjs";import{I as E,N as G}from"./ContentCopy-Ds2LtgQK.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-CClfw3S6.chunk.mjs";import"./mdi-DEKCY6bD.chunk.mjs";import"./index-DqIuD5e7.chunk.mjs";import"./NcNoteCard-CWiO3Dse-DuB9YE1o.chunk.mjs";const K={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),s("title",ae,l(t.title),1)):I("",!0)])],8,X))],16,Q)}const ie=M(K,[["render",te]]),re={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},le=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),s("title",se,l(t.title),1)):I("",!0)])],8,oe))],16,le)}const ce=M(re,[["render",de]]),ue={class:"social-button"},fe=["src"],he=["src"],pe=["src"],me={style:{margin:"10px 0"}},ge=["href"],Ce=Y({__name:"PersonalSettings",setup(d){const n=window.OC.theme.productName,t=h("federatedfilesharing","color"),k=h("federatedfilesharing","textColor"),p=h("federatedfilesharing","cloudId"),y=h("federatedfilesharing","docUrlFederated"),m=h("federatedfilesharing","logoPath"),g=h("federatedfilesharing","reference"),S=x("core","facebook"),D=x("core","mastodon"),F=x("core","bluesky"),U=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:g}),B=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(B)}&url=${encodeURIComponent(g)}`,T=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(g)}`,A=`https://bsky.app/intent/compose?text=${encodeURIComponent(U)}`,O=new URL(m,location.origin),v=z(!1),C=z(!1),$=_(()=>`
	padding:10px;
	background-color:${t};
	color:${k};
	border-radius:3px;
	padding-inline-start:4px;`),N=`background-image:url(${O});width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;`,P=_(()=>`<a target="_blank" rel="noreferrer noopener" href="${g}" style="${$.value}">
	<span style="${N}"></span>
	${a("federatedfilesharing","Share with me via Nextcloud")}
</a>`),j=_(()=>C.value?a("federatedfilesharing","Cloud ID copied"):a("federatedfilesharing","Copy"));async function V(){try{await navigator.clipboard.writeText(p),H(a("federatedfilesharing","Cloud ID copied"))}catch{window.prompt(a("federatedfilesharing","Clipboard not available. Please copy the cloud ID manually."),p)}C.value=!0,H(a("federatedfilesharing","Copied!")),setTimeout(()=>{C.value=!1},2e3)}return(ye,c)=>(o(),w(e(G),{name:e(a)("federatedfilesharing","Federated Cloud"),description:e(a)("federatedfilesharing","You can share with anyone who uses a {productName} server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com",{productName:e(n)}),docUrl:e(y)},{default:r(()=>[u(e(q),{class:"federated-cloud__cloud-id",readonly:"",label:e(a)("federatedfilesharing","Your Federated Cloud ID"),modelValue:e(p),success:C.value,showTrailingButton:"",trailingButtonLabel:j.value,onTrailingButtonClick:V},{"trailing-button-icon":r(()=>[C.value?(o(),w(ie,{key:0,size:20,fillColor:"var(--color-border-success)"})):(o(),w(E,{key:1,size:20}))]),_:1},8,["label","modelValue","success","trailingButtonLabel"]),i("p",ue,[f(l(e(a)("federatedfilesharing","Share it so your friends can share files with you:")),1),c[1]||(c[1]=i("br",null,null,-1)),u(e(b),{href:A},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(F)},null,8,fe)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Bluesky"))+" ",1)]),_:1}),u(e(b),{href:T},{icon:r(()=>[i("img",{class:"social-button__icon social-button__icon--bright",src:e(S)},null,8,he)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Facebook"))+" ",1)]),_:1}),u(e(b),{href:R},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(D)},null,8,pe)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Mastodon"))+" ",1)]),_:1}),u(e(b),{class:"social-button__website-button",onClick:c[0]||(c[0]=ve=>v.value=!v.value)},{icon:r(()=>[u(ce,{size:20})]),default:r(()=>[f(" "+l(e(a)("federatedfilesharing","Add to your website")),1)]),_:1})]),v.value?(o(),s(Z,{key:0},[i("p",me,[i("a",{target:"_blank",rel:"noreferrer noopener",href:e(g),style:J($.value)},[i("span",{style:N}),f(" "+l(e(a)("federatedfilesharing","Share with me via {productName}",{productName:e(n)})),1)],12,ge)]),i("div",null,[i("p",null,l(e(a)("federatedfilesharing","HTML Code:")),1),c[2]||(c[2]=i("br",null,null,-1)),i("pre",null,[i("code",null,l(P.value),1)])])],64)):I("",!0)]),_:1},8,["name","description","docUrl"]))}}),be=M(Ce,[["__scopeId","data-v-7ee4c871"]]),ke=W(be);ke.mount("#vue-personal-federated");
//# sourceMappingURL=federatedfilesharing-settings-personal.mjs.map
