System.register(["./p-0607228f.system.js"],(function(t){"use strict";var e,n,i,a;return{setters:[function(t){e=t.r;n=t.c;i=t.h;a=t.H}],execute:function(){var s="x-quantity x-chip x-button button{background-color:transparent !important}x-quantity input{width:2rem;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:bold;text-align:center;display:inline-block;position:relative;margin:0 0.25rem;border:none;background:transparent;outline:none;-moz-appearance:textfield;border-radius:0.25rem}x-quantity input::-webkit-outer-spin-button,x-quantity input::-webkit-inner-spin-button{-webkit-appearance:none}.is-dark-mode x-quantity input{color:var(--color-text-light, #FEFEFE)}";var r=s;var u=t("x_quantity",function(){function t(t){e(this,t);this.sub=n(this,"sub",7);this.sum=n(this,"sum",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.min=0;this.max=undefined;this.value=1;this.number=undefined}t.prototype.onValueChange=function(t){this.number=typeof t==="number"?t:parseInt(t);this.internals.setFormValue(this.number.toString())};t.prototype.componentWillLoad=function(){this.number=this.value;this.internals.setFormValue(this.number.toString())};t.prototype.handleChange=function(t){this.value=t.target.value;this.internals.setFormValue(t.target.value)};t.prototype.onPlusClick=function(){if(!Number.isNaN(this.number)&&this.number+1>this.max){return}this.number++;this.sum.emit(this.number)};t.prototype.onMinusClick=function(){if(!Number.isNaN(this.number)&&this.number-1<this.min){return}this.number--;this.sub.emit(this.number)};t.prototype.render=function(){return i(a,{key:"bf3d39314e4e32c95102aa4fa27747f121f6f16a"},i("x-chip",{key:"3422b39e9b3adfd50325ba305bfbef66b5e69a9e",hoverable:true},i("x-button",{key:"412df00631a714992838f6fa254e76baf4bafa73",icon:"plus",onClick:this.onPlusClick.bind(this)}),i("input",{key:"5839335e6c343b24e9b5a8f20adde2ee0f824740",type:"number",value:this.number,min:this.min,max:this.max,onInput:this.handleChange.bind(this)}),i("x-button",{key:"0a5ea6ecb54b4fba5a0e5a8def341638220b1714",icon:"minus",onClick:this.onMinusClick.bind(this)})))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["onValueChange"]}},enumerable:false,configurable:true});return t}());u.style=r}}}));