1import{d as x,i as w,o as i,b as c,k as C,w as L,q as a,m as s,a as S,n,t as j,r as _,y as D,z as p}from"./Ct8m0tvh.js";const E={class:"min-w-[81px] min-h-[32px]"},N={key:0,class:"flex justify-center items-center"},O={key:1,class:"flex justify-center items-center"},q=["href"],B=["aria-label"],P={key:0,class:"absolute top-0 -translate-y-full"},T=["href"],d="square-30 mx-10 rounded-full flex items-center justify-center p-10 bg-blue-400 hover:bg-red-400",b="bg-center bg-no-repeat bg-contain h-full w-full",m="Kopier link",V=x({__name:"someShare",props:{type:{type:String,default:"artikel"},params:{type:Object,default:()=>({})},title:{type:String,default:""},text:{type:String,default:void 0}},setup(y){const u=y,r=p(""),f=p(!1),h=async()=>{const o=document.querySelector('meta[name="description"]')?.getAttribute("content"),e=u.text??o??"";try{const t={title:u.title||document.title,url:r.value};e&&(t.text=e),await navigator.share(t)}catch(t){console.error("Error sharing",t)}},l=p(m),g=p(!1),k=async o=>{try{await navigator.clipboard.writeText(o),l.value="Kopieret!",setTimeout(()=>{l.value=m},5e3)}catch(e){console.error("Error copying link",e)}};return w(()=>{const o=new URL(window.location.href);for(const[e,t]of Object.entries(u.params))o.searchParams.set(e,t);r.value=o.toString(),f.value=!!navigator.share,g.value=!!navigator.clipboard}),(o,e)=>{const t=D;return i(),c("div",E,[C(t,null,{default:L(()=>[a(f)?(i(),c("div",N,[s("button",{onClick:e[0]||(e[0]=v=>h()),class:"border border-black rounded-30 font-medium flex items-center gap-5 px-20 py-5 text-12"},[...e[2]||(e[2]=[s("i",{class:"bg-svg-share-black bg-contain bg-center bg-no-repeat square-13"},null,-1),S("Del",-1)])])])):(i(),c("div",O,[s("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+a(r),target:"_blank",rel:"nofollow noopener","aria-label":"Del på Facebook",class:n(d)},[s("i",{class:n([b,"bg-svg-some-facebook-white"])})],8,q),a(g)?(i(),c("button",{key:0,onClick:e[1]||(e[1]=v=>k(a(r))),class:n([d,"relative"]),"aria-label":a(l)},[s("i",{class:n([b,"bg-svg-copy-white"])}),a(l)!==m?(i(),c("span",P,j(a(l)),1)):_("",!0)],8,B)):_("",!0),s("a",{href:"mailto:?body="+a(r),class:n(d),"aria-label":"Del på email"},[s("i",{class:n([b,"bg-svg-mail-white"])})],8,T)]))]),_:1})])}}}),K=Object.assign(V,{__name:"SomeShare"});export{K as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.