import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-98dfb63a.js";import{I as Item}from"./index-997ef4e9.js";import{d as dist}from"./index-649488b2.js";import"./Token-0644b4fc.js";var sv={"@":"à","Remove item":"Ta bort artikel"};function create(e){return dist.create({sv:sv},e)}var styleCss=".sc-ig-display-item-h{display:block}[hidden].sc-ig-display-item-h{display:none}.sc-ig-display-item-h>section.sc-ig-display-item{margin-left:.3em;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.sc-ig-display-item-h>section.sc-ig-display-item>span.sc-ig-display-item{margin-bottom:0.8em;padding-left:1.5em;white-space:nowrap;overflow:hidden;text-overflow:visible}.sc-ig-display-item-h>section.sc-ig-display-item>span.medium.sc-ig-display-item{-ms-flex-positive:2;flex-grow:2}.sc-ig-display-item-h>section.sc-ig-display-item>span.small.sc-ig-display-item{-ms-flex-positive:1;flex-grow:1}.sc-ig-display-item-h>section.sc-ig-display-item>span.big.sc-ig-display-item{-ms-flex-positive:3;flex-grow:3}.left.sc-ig-display-item{border-left:1px solid rgb(var(--smoothly-medium-color))}.sc-ig-display-item-h>section.sc-ig-display-item>smoothly-trigger.sc-ig-display-item{margin-right:0px;margin-left:8px;margin-top:-3px;float:right}";var IntergiroDisplayItem=function(){function e(e){registerInstance(this,e);this.itemDeleted=createEvent(this,"itemDeleted",7);this.item={};this.removable=true}e.prototype.componentWillLoad=function(){this.t=create(this.element)};e.prototype.delete=function(e){if(e.detail.name=="item"){e.stopPropagation();this.itemDeleted.emit({index:this.index})}};e.prototype.render=function(){var e=this.t;return[this.item?h("section",null,h("span",{class:"small"},this.item.quantity?this.item.quantity:this.item.unit?1:""," ",this.item.unit),h("span",{class:"big"},this.item.name),h("span",{class:"medium"},e("@")," ",Item.amount(this.item)/(this.item.quantity?this.item.quantity:1)," ",this.currency),h("span",{class:"medium"},Item.amount(this.item)," ",this.currency),this.removable?h("smoothly-trigger",{fill:"clear",name:"item"},h("smoothly-icon",{size:"small",toolTip:e("Remove item"),name:"trash"})):""):""]};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();IntergiroDisplayItem.style=styleCss;export{IntergiroDisplayItem as ig_display_item};