@postnord/web-components
Version:
PostNord Web Components
5 lines • 5.44 kB
JavaScript
/*!
* Built with Stencil
* By PostNord.
*/
import{transformTag as t,proxyCustomElement as o,HTMLElement as s,h as e,Host as n}from"@stencil/core/internal/client";import{o as i}from"./open_in_new.js";import{k as r,S as p,e as a,N as d}from"./helpers.js";import{d as w}from"./pn-icon2.js";import{d as c}from"./pn-text-link2.js";const l={SE:{domain:{sv:"https://www.postnord.se",en:"https://www.postnord.se/en"},contact:{sv:"https://www.postnord.se/kundservice",en:"https://www.postnord.se/en/help-and-support/contact-us"},cookies:{sv:"https://www.postnord.se/cookies",en:"https://www.postnord.se/en/cookies"},privacy:{sv:"https://www.postnord.se/integritetspolicy",en:"https://www.postnord.se/en/privacy-policy"},terms:{sv:"https://www.postnord.se/siteassets/pdf/villkor/anvandarvillkor-postnord-konto.pdf",en:"https://www.postnord.se/siteassets/pdf/villkor/anvandarvillkor-postnord-konto.pdf"}},DK:{domain:{da:"https://www.postnord.dk",en:"https://www.postnord.com/en"},contact:{da:"https://www.postnord.dk/kundeservice",en:"https://www.postnord.dk/en/help-and-support"},cookies:{da:"https://www.postnord.dk/cookies",en:"https://www.postnord.dk/en/cookies"},privacy:{da:"https://www.postnord.dk/personlige-oplysninger",en:"https://www.postnord.se/en/privacy-policy"},terms:{da:"https://www.postnord.dk/contentassets/4806069a7d6c44959c94b13417d78f22/kundeportalen.pdf",en:"https://www.postnord.dk/kundeservice/kundeservice-erhverv/forretningsbetingelser"}},FI:{domain:{fi:"https://www.postnord.fi",sv:"https://www.postnord.fi/sv",en:"https://www.postnord.fi/en"},contact:{fi:"https://www.postnord.fi/asiakaspalvelu/ota-yhteytta",sv:"https://www.postnord.fi/sv/kundtjanst",en:"https://www.postnord.fi/en/customer-service"},cookies:{fi:"https://www.postnord.fi/yksityisyydensuoja/tietoa-evasteista",sv:"https://www.postnord.fi/sv/integritetspolicy/information-om-cookies",en:"https://www.postnord.fi/en/privacy-policy/information-about-the-cookies"},privacy:{fi:"https://www.postnord.fi/yksityisyydensuoja",sv:"https://www.postnord.fi/sv/integritetspolicy",en:"https://www.postnord.se/en/privacy-policy"},terms:{fi:"https://www.postnord.fi/laheta/sopimusehdot",sv:"https://www.postnord.fi/sv/skicka/villkor",en:"https://www.postnord.fi/en/sending/terms"}},NO:{domain:{no:"https://www.postnord.no",en:"https://www.postnord.no/en"},contact:{no:"https://www.postnord.no/kundeservice",en:"https://www.postnord.no/en/contact-postnord"},cookies:{no:"https://www.postnord.no/cookies",en:"https://www.postnord.no/en/cookies"},privacy:{no:"https://www.postnord.no/personvernerklaering",en:"https://www.postnord.se/en/privacy-policy"}},contact:"https://portal.postnord.com/customerservice"},h={cookies:{sv:"Cookies",en:"Cookies",da:"Cookies",fi:"Evästeet",no:"Cookies"},questions:{sv:"Undrar du över något?",en:"Do you have any questions?",da:"Har du nogen spørgsmål?",fi:"Onko sinulla kysyttävää?",no:"Har du noen spørsmål?"},contact:{sv:"Kontakta oss",en:"Get in touch",da:"Kontakt os",fi:"Ota yhteyttä",no:"Ta kontakt"},info:{sv:"Mer information om PostNord hittar du på",en:"More information about PostNord can be found at",da:"Mere information om PostNord findes på",fi:"Lisää tietoa PostNordista löydät osoitteesta",no:"Du finner mer informasjon om PostNord på"},privacy:{sv:"Integritetspolicy",en:"Privacy policy",da:"Integritetspolitik",fi:"Yksityisyysasetukset",no:"Privacy policy"},terms:{sv:"Villkor",en:"Terms and conditions",da:"Vilkår og betingelser",fi:"Sopimusehdot",no:"Betingelser og vilkår"}},f=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get hostElement(){return this}market=null;language=null;async componentWillLoad(){this.market&&this.language||await r(this.hostElement)}getLink(t){return l?.[this.market||p]?.[t]?.[this.language||a]}getText(t){return"domain"===t?this.getLink(t)?.replace("https://www.",""):h?.[t]?.[this.language]}renderLink(t){const o=this.getLink(t),s=this.getText(t);if(o&&s)return e("pn-text-link",{label:s,target:"_blank",rel:"noopener noreferrer",href:o,icon:i})}render(){return e(n,{key:"5ba1e53dd0dc631bf8bbe878a622ec577224a9f3"},e("div",{key:"530b0e803506fed3cae180d1289535538f64e1bb",class:"pn-footer-row"},e("p",{key:"47e19b88eb7c6860f0921fdacc79686aff3d2b61"},this.getText("questions")),this.renderLink("contact")),e("div",{key:"2986a92cb2183d53c871030db72ef34aa08e847b",class:"pn-footer-row"},this.market!==d&&this.renderLink("terms"),this.renderLink("privacy"),this.renderLink("cookies")),e("div",{key:"550a23c5b872b6dc9c69b4e231ce7634d5f12994",class:"pn-footer-row"},e("p",{key:"52871c90b92a2a64fc247ac83fdc62215e54a574"},this.getText("info")),this.renderLink("domain")))}static get style(){return`${t("pn-footer")}{color:#5e554a;padding-bottom:2em;display:block}${t("pn-footer")} .pn-footer-row{padding:0.2em 0;font-size:0.9em;text-align:center}${t("pn-footer")} .pn-footer-row p{margin:0 0.2em 0 0;display:inline-block}${t("pn-footer")} ${t("pn-text-link")}{margin-right:0.5em}${t("pn-footer")} ${t("pn-text-link")}:last-child{margin-right:0}`}},[512,"pn-footer",{market:[1],language:[1]}]),k=f,m=function(){"undefined"!=typeof customElements&&["pn-footer","pn-icon","pn-text-link"].forEach((o=>{switch(o){case"pn-footer":customElements.get(t(t(o)))||customElements.define(t(t(o)),f);break;case"pn-icon":customElements.get(t(t(o)))||w();break;case"pn-text-link":customElements.get(t(t(o)))||c()}}))};export{k as PnFooter,m as defineCustomElement}