System.register(["./index-c820db66.system.js","./index-dc84aac6.system.js","./index-2d937df8.system.js","./index-9ceb7f8c.system.js","./_commonjsHelpers-c8881874.system.js","./index-b0fe4e4c.system.js"],(function(i){"use strict";var t,e,s,m,o,c;return{setters:[function(i){t=i.r;e=i.j;s=i.h;m=i.g},function(i){o=i.I},function(i){c=i.d},function(){},function(){},function(){}],execute:function(){var l={details:"detaljer","excluding VAT":"exklusive moms",Edit:"Redigera",Cancel:"Avbryt",Save:"Spara","Paid from balance":"Betalat från saldo"};function n(i){return c.create({sv:l},i)}var r=".sc-ig-item-h{display:block}[hidden].sc-ig-item-h{display:none}[editable].sc-ig-item-h{padding-right:1em}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item{padding:0;margin:0}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item>*.sc-ig-item{white-space:nowrap}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item>*.sc-ig-item:first-child{overflow:hidden;text-overflow:ellipsis}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item>*.sc-ig-item:last-child{margin-left:auto}.sc-ig-item-h>form.sc-ig-item>smoothly-submit.sc-ig-item,.sc-ig-item-h>form.sc-ig-item>smoothly-icon.sc-ig-item,.sc-ig-item-h:hover>form.sc-ig-item>smoothly-popup.sc-ig-item{display:block;margin-right:-2em;float:right;cursor:pointer;border:none}.sc-ig-item-h>form.sc-ig-item>smoothly-popup.sc-ig-item{display:none}.sc-ig-item-h>form.sc-ig-item>smoothly-submit.sc-ig-item{margin-right:-4em;margin-top:.6em}.sc-ig-item-h>form.sc-ig-item>smoothly-icon.sc-ig-item{margin-top:.9em}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item>smoothly-input.sc-ig-item:nth-of-type(3){-ms-flex-positive:2;flex-grow:2;width:50%}.sc-ig-item-h>form.sc-ig-item>ol.sc-ig-item>li.sc-ig-item>smoothly-input.sc-ig-item:nth-of-type(1),.sc-ig-item-h>ol.sc-ig-item>li.sc-ig-item>smoothly-input.sc-ig-item:nth-of-type(2){-ms-flex-positive:1;flex-grow:1;width:20%}";var a=i("ig_item",function(){function i(i){t(this,i);this.edit=e(this,"edit",7);this.mode="display";this.editable=false}i.prototype.componentWillLoad=function(){this.t=n(this.element)};i.prototype.update=function(i){if(o.is(this.item)){var t={quantity:Number(i.detail.quantity),unit:i.detail.unit,name:i.detail.name,price:Number(i.detail.price.slice(0,-4)),vat:Number(i.detail.vat)};this.item=Object.assign(Object.assign({},this.item),t)}else this.item=i.detail.price;this.edit.emit(this.item);this.mode="display"};i.prototype.render=function(){var i=this;var t;return s("form",null,this.mode=="display"&&this.editable?s("smoothly-popup",null,s("smoothly-icon",{name:"ellipsis-vertical-outline",size:"small"}),s("div",{color:"light",slot:"popup"},s("smoothly-icon",{size:"small",name:"pencil-outline",toolTip:this.t("Edit"),onClick:function(){return i.mode="edit"}}))):this.mode=="edit"?[s("smoothly-icon",{name:"close-circle",toolTip:this.t("Cancel"),fill:"clear",size:"small",color:"medium",onClick:function(){return i.mode="display"}}),s("smoothly-submit",{prevent:true,onSubmit:function(t){return i.update(t)}},s("smoothly-icon",{name:"checkmark-circle",toolTip:this.t("Save"),fill:"clear",size:"small",color:"success"}))]:[],s("ol",null,s("li",null,o.is(this.item)?this.mode=="display"?[s("span",null,this.item.quantity," ",this.item.unit," ",this.t((t=this.item.name)!==null&&t!==void 0?t:"")),s("smoothly-display",{type:"price",value:o.amount(this.item),currency:this.currency})]:[s("smoothly-input",{type:"price",name:"quantity",value:this.item.quantity},this.t("Quantity")),s("smoothly-input",{type:"text",name:"unit",value:this.item.unit},this.t("Unit")),s("smoothly-input",{type:"text",name:"name",value:this.item.name},this.t("Name")),s("smoothly-input",{type:"price",name:"vat",value:this.item.vat},this.t("VAT")),s("smoothly-input",{type:"price",name:"price",value:this.item.price,currency:this.currency},this.t("Price"))]:this.mode=="display"?s("smoothly-display",{type:"price",value:o.amount(this.item),currency:this.currency}):s("smoothly-input",{type:"price",name:"price",value:this.item,currency:this.currency},this.t("Price")))))};Object.defineProperty(i.prototype,"element",{get:function(){return m(this)},enumerable:false,configurable:true});return i}());a.style=r}}}));