import{p as l,e as h}from"./i18n-Dnhn5Rxr.js";import{a as d,f as v,R as w,a4 as S,x as m,w as f,T as _,a3 as x,U as u,ad as y,G as A,z as Z}from"./index-DWyDLubb.js";import{I as B}from"./ScrollFade.svelte_svelte_type_style_lang-DPHOQHBm.js";import{S as C}from"./utils.svelte-CCyS_0CY.js";var I=v('<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="100%" height="100%"><path d="M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z" fill="currentColor"></path></svg>');function M(s){var a=I();d(s,a)}function z(s,a){w(a,!1);const c=S();let n=l(a,"formatter",12),o=l(a,"value",12),r=l(a,"i18n",12),i=x(!1);var g={get formatter(){return n()},set formatter(e){n(e),u()},get value(){return o()},set value(e){o(e),u()},get i18n(){return r()},set i18n(e){r(e),u()}};h();{let e=y(()=>(A(r()),Z(()=>r()("common.share"))));B(s,{get Icon(){return M},get label(){return f(e)},get pending(){return f(i)},onclick:async()=>{try{m(i,!0);const t=await n()(o());c("share",{description:t})}catch(t){console.error(t);let p=t instanceof C?t.message:"Share failed.";c("error",p)}finally{m(i,!1)}}})}return _(g)}export{M as C,z as S};
