import{r as i,c as s,h as t,g as e}from"./p-e964d29c.js";import{I as l}from"./p-11286511.js";import{d as a}from"./p-7b48c7c5.js";import"./p-4f46f4bb.js";const m={"@":"à","Remove item":"Ta bort artikel"},o=class{constructor(t){i(this,t),this.itemDeleted=s(this,"itemDeleted",7),this.item={},this.removable=!0}componentWillLoad(){this.t=a.create({sv:m},this.element)}delete(i){"item"==i.detail.name&&(i.stopPropagation(),this.itemDeleted.emit({index:this.index}))}render(){const i=this.t;return[this.item?t("section",null,t("span",{class:"small"},this.item.quantity?this.item.quantity:this.item.unit?1:""," ",this.item.unit),t("span",{class:"big"},this.item.name),t("span",{class:"medium"},i("@")," ",l.amount(this.item)/(this.item.quantity?this.item.quantity:1)," ",this.currency),t("span",{class:"medium"},l.amount(this.item)," ",this.currency),this.removable?t("smoothly-trigger",{fill:"clear",name:"item"},t("smoothly-icon",{size:"small",toolTip:i("Remove item"),name:"trash"})):""):""]}get element(){return e(this)}};o.style=".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}";export{o as ig_display_item}