import{r as registerInstance,h,g as getElement}from"./index-08b73e9e.js";import{d as dist$1}from"./index-3cf720d3.js";import{P as PhoneNumbers,E as EmailAddresses}from"./Item-f4cbd6f4.js";import{I as Item}from"./index-945f930d.js";import"./Credentials-b84c0c5f.js";import"./Token-ba2c5d5c.js";import{d as dist}from"./index-a0a71287.js";import"./index-ff7475d6.js";import"./_commonjsHelpers-9943807e.js";import"./index-1f953d81.js";import"./TextDecoder-357ac2ce.js";var sv={"Order complete":"Köp slutfört","Order number":"Ordernummer",Amount:"Summa",Created:"Skapad",Phone:"Telefon","Not available":"Ej angivet","Thanks for your purchase!":"Tack för köpet!"};function create(e){return dist.create({sv:sv},e)}var styleCss=":host{display:block}:host[hidden]{display:none}header{height:56px;width:100%}header>h1{margin:0;color:rgb(var(--smoothly-success-contrast));background:rgb(var(--smoothly-success-color));padding:0.8em}main{margin:1em}dl{margin-top:3em}dt{font-weight:bold}dd{margin-bottom:1em;margin-left:0}";var IntergiroDisplayOrder=function(){function e(e){registerInstance(this,e)}e.prototype.componentWillLoad=function(){if(typeof this.order=="string")this.order=JSON.parse(this.order);this.t=create(this.element)};e.prototype.render=function(){var e=this.t;this.order=this.order;return[h("header",null,h("h1",null,e("Order complete"))),h("main",null,h("dl",null,h("dt",null,e("Order number")),h("dd",null,this.order.number?this.order.number:e("Not available")),h("dt",null,e("Amount")),h("dd",null,this.order.currency," ",Item.amount(this.order.items)),h("dt",null,e("Created")),h("dd",null,h("smoothly-display-date-time",{datetime:this.order.created?dist$1.DateTime.localize(dist$1.DateTime.parse(this.order.created)):e("Not available")})),!this.order.customer||typeof this.order.customer=="string"?"":this.order.customer.phone?[h("dt",null,e("Phone")),h("dd",null,PhoneNumbers.get(this.order.customer.phone))]:this.order.customer.email?[h("dt",null,e("Email")),h("dd",null,EmailAddresses.get(this.order.customer.email))]:""),h("h2",null,e("Thanks for your purchase!")))]};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();IntergiroDisplayOrder.style=styleCss;export{IntergiroDisplayOrder as ig_display_order};