import{r as s,c as i,h as t,g as e}from"./p-bf76c688.js";import"./p-2094943b.js";import{I as a}from"./p-c87b74f2.js";import{d as p}from"./p-07ea43bc.js";const l={"@":"à","Remove item":"Ta bort artikel"},c=class{constructor(t){s(this,t),this.itemDeleted=i(this,"itemDeleted",7),this.item={},this.removable=!0}componentWillLoad(){this.t=p.create({sv:l},this.element)}delete(s){"item"==s.detail.name&&(s.stopPropagation(),this.itemDeleted.emit({index:this.index}))}render(){const s=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"},s("@")," ",a.amount(this.item)/(this.item.quantity?this.item.quantity:1)," ",this.currency),t("span",{class:"medium"},a.amount(this.item)," ",this.currency),this.removable?t("smoothly-trigger",{fill:"clear",name:"item"},t("smoothly-icon",{size:"small",toolTip:s("Remove item"),name:"trash"})):""):""]}get element(){return e(this)}};c.style=".sc-payfunc-display-item-h{display:block}[hidden].sc-payfunc-display-item-h{display:none}.sc-payfunc-display-item-h>section.sc-payfunc-display-item{margin-left:.3em;display:flex;flex-wrap:nowrap}.sc-payfunc-display-item-h>section.sc-payfunc-display-item>span.sc-payfunc-display-item{margin-bottom:0.8em;padding-left:1.5em;white-space:nowrap;overflow:hidden;text-overflow:visible}.sc-payfunc-display-item-h>section.sc-payfunc-display-item>span.medium.sc-payfunc-display-item{flex-grow:2}.sc-payfunc-display-item-h>section.sc-payfunc-display-item>span.small.sc-payfunc-display-item{flex-grow:1}.sc-payfunc-display-item-h>section.sc-payfunc-display-item>span.big.sc-payfunc-display-item{flex-grow:3}.left.sc-payfunc-display-item{border-left:1px solid rgb(var(--smoothly-medium-color))}.sc-payfunc-display-item-h>section.sc-payfunc-display-item>smoothly-trigger.sc-payfunc-display-item{margin-right:0px;margin-left:8px;margin-top:-3px;float:right}";export{c as payfunc_display_item}