{"version":3,"sources":["webpack:///./src/composables/meta.ts","webpack:///./src/composables/canonical.ts","webpack:///./src/views/ContactUs.vue","webpack:///./src/views/ContactUs.vue?7cd9"],"names":["setMeta","title","description","document","length","metaDescription","querySelector","setAttribute","newMetaDescription","createElement","head","appendChild","useMeta","titleRef","ref","descriptionRef","onMounted","value","watchEffect","i","setCanonical","href","address","canonical","metaCanonicalValue","useCanonical","hrefRef","dontUseCanonical","remove","removeCanonical","_hoisted_1","class","_hoisted_2","_createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","xmlns","width","height","fill","viewBox","d","_defineComponent","__name","setup","__props","router","useRouter","route","useRoute","goBack","go","async","path","substring","_ctx","_cache","_openBlock","_createElementBlock","onClick","_withModifiers","_createTextVNode","__exports__"],"mappings":"uGAAA,kDAEM,SAAUA,EAAQC,EAAeC,GACnCC,SAASF,MAAQ,GAAGA,IAASA,EAAMG,OAAS,MAAQ,uFACpD,MAAMC,EAAkBF,SAASG,cAAc,4BAC/C,GAAID,EACAA,EAAgBE,aAAa,UAAWL,OACrC,CACH,MAAMM,EAAqBL,SAASM,cAAc,QAClDD,EAAmBD,aAAa,OAAQ,eACxCC,EAAmBD,aAAa,UAAWL,GAC3CC,SAASO,KAAKC,YAAYH,IAI5B,SAAUI,EAAQX,EAAeC,GACnC,MAAMW,EAAWC,cAAIb,GACfc,EAAiBD,cAAIZ,GAU3B,OARAc,qBAAU,KACNhB,EAAQa,EAASI,MAAOF,EAAeE,MAAKA,IAGhDC,uBAAY,KACRlB,EAAQa,EAASI,MAAOF,EAAeE,MAAKA,IAGzC,CACHhB,MAAOY,EACPX,YAAaa,K,kCC7BrB,+DAAAI,CAAA,oBAEM,SAAUC,EAAaC,GACzB,MAAMC,EAAU,6BAA+BD,EAAKjB,OAAS,EAAI,IAAIiB,EAASA,GACxEE,EAAYpB,SAASG,cAAc,yBAEzC,GAAIiB,EACAA,EAAUhB,aAAa,OAAQe,OAC5B,CACH,MAAME,EAAqBrB,SAAS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0B,0BAAiB,eAChB,EAAG3B,WC1DZ,MAAM4B,EAAc,EAEL","file":"js/ContactUs.4dbb115e.js","sourcesContent":["import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setMeta(title: string, description: string) {\r\n document.title = `${title}${(title.length ? ' - ' : '')}NG Hantverk - Upplev äventyret med våra handgjorda och exklusiva knivar och fodral`;\r\n const metaDescription = document.querySelector('meta[name=\"description\"]');\r\n if (metaDescription) {\r\n metaDescription.setAttribute('content', description);\r\n } else {\r\n const newMetaDescription = document.createElement('meta');\r\n newMetaDescription.setAttribute('name', 'description');\r\n newMetaDescription.setAttribute('content', description);\r\n document.head.appendChild(newMetaDescription);\r\n }\r\n}\r\n\r\nexport function useMeta(title: string, description: string) {\r\n const titleRef = ref(title);\r\n const descriptionRef = ref(description);\r\n\r\n onMounted(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n return {\r\n title: titleRef,\r\n description: descriptionRef,\r\n };\r\n}","import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setCanonical(href: string) {\r\n const address = 'https://www.nghantverk.se' + (href.length > 0 ? `/${href}` : href);\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n\r\n if (canonical) {\r\n canonical.setAttribute('href', address);\r\n } else {\r\n const metaCanonicalValue = document.createElement('link');\r\n metaCanonicalValue.setAttribute('rel', 'canonical');\r\n metaCanonicalValue.setAttribute('href', address);\r\n document.head.appendChild(metaCanonicalValue);\r\n }\r\n}\r\n\r\nexport function removeCanonical() {\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n if (canonical)\r\n canonical.remove();\r\n}\r\n\r\nexport function useCanonical(href: string) {\r\n const hrefRef = ref(href);\r\n\r\n onMounted(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n return {\r\n href: hrefRef\r\n };\r\n}\r\n\r\nexport function dontUseCanonical() {\r\n removeCanonical();\r\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"row gx-4 gx-lg-5 padding-bottom-100\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"col-12\" }, [\n /*#__PURE__*/_createElementVNode(\"h1\", { class: \"text-green\" }, \"Kontakta oss\")\n], -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"col-12 pt-5 mb-2\" }, [\n /*#__PURE__*/_createElementVNode(\"h4\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", { href: \"mailto:micke@nghantverk.se\" }, \"micke@nghantverk.se\")\n ])\n], -1)\nconst _hoisted_4 = { class: \"col-12 mt-5\" }\nconst _hoisted_5 = [\"onClick\"]\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16\",\n height: \"16\",\n fill: \"currentColor\",\n class: \"bi bi-arrow-left\",\n viewBox: \"0 0 16 16\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n \"fill-rule\": \"evenodd\",\n d: \"M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z\"\n })\n], -1)\n\nimport { useRouter, useRoute } from 'vue-router';\r\n import { onMounted } from 'vue';\r\n import { useMeta } from '@/composables/meta';\r\n import { useCanonical } from '@/composables/canonical';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'ContactUs',\n setup(__props) {\n\r\n const router = useRouter();\r\n const route = useRoute();\r\n\r\n const goBack = () => {\r\n router.go(-1);\r\n };\r\n\r\n onMounted(async () => {\r\n useMeta('Kontakta oss', 'Här hittar du information om hur du kan komma i kontakt med oss.');\r\n useCanonical(route.path.substring(1));\r\n });\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n _hoisted_2,\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"button\", {\n class: \"btn btn-outline-primary btn-custom-size\",\n onClick: _withModifiers(goBack, [\"prevent\"])\n }, [\n _hoisted_6,\n _createTextVNode(\" TILLBAKA \")\n ], 8, _hoisted_5)\n ])\n ]))\n}\n}\n\n})","import script from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"sourceRoot":""}