UNPKG

@postnord/web-components

Version:

PostNord Web Components

185 lines (179 loc) 6.98 kB
/*! * Built with Stencil * By PostNord. */ import { r as registerInstance, g as getElement, h, a as Host } from './index-5606614b.js'; import { o as open_in_new } from './open_in_new-3f9f4e63.js'; import { j as awaitTopbar, S as SE, e as en, N as NO } from './helpers-88f72b54.js'; const URLS = { 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', }; const translations = { 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', }, }; const pnFooterCss = "pn-footer{color:#5e554a;padding-bottom:2em;display:block}pn-footer .pn-footer-row{padding:0.2em 0;font-size:0.9em;text-align:center}pn-footer .pn-footer-row p{margin:0 0.2em 0 0;display:inline-block}pn-footer pn-text-link{margin-right:0.5em}pn-footer pn-text-link:last-child{margin-right:0}"; const PnFooterStyle0 = pnFooterCss; const PnFooter = class { constructor(hostRef) { registerInstance(this, hostRef); this.market = null; this.language = null; } get hostElement() { return getElement(this); } async componentWillLoad() { if (this.market && this.language) return; await awaitTopbar(this.hostElement); } getLink(name) { return URLS?.[this.market || SE]?.[name]?.[this.language || en]; } getText(name) { if (name === 'domain') return this.getLink(name)?.replace('https://www.', ''); return translations?.[name]?.[this.language]; } renderLink(name) { const url = this.getLink(name); const text = this.getText(name); if (url && text) { return h("pn-text-link", { label: text, target: "_blank", rel: "noopener noreferrer", href: url, icon: open_in_new }); } } render() { return (h(Host, { key: '1aabdc7109561bf4bc8898a868a62ae876748393' }, h("div", { key: '890e9c401a690c620c4b6eace747a8a66a59c0d4', class: "pn-footer-row" }, h("p", { key: '77f30b40fe86d763499898145656da51c323a4a1' }, this.getText('questions')), this.renderLink('contact')), h("div", { key: 'de758452b670ebe4677067b8c90eae0808237402', class: "pn-footer-row" }, this.market !== NO && this.renderLink('terms'), this.renderLink('privacy'), this.renderLink('cookies')), h("div", { key: 'c29172ff11e9d21bbe084487fef6c8e38620cf5d', class: "pn-footer-row" }, h("p", { key: 'c585618b0ed711185d9c23cf9cea5417db2c8142' }, this.getText('info')), this.renderLink('domain')))); } }; PnFooter.style = PnFooterStyle0; export { PnFooter as pn_footer }; //# sourceMappingURL=pn-footer.entry.js.map