System.register(["./index-0425c4de.system.js","./position-element-3e47398a.system.js"],(function(t){"use strict";var e,n,i,s,a,o;return{setters:[function(t){e=t.r;n=t.e;i=t.h;s=t.f;a=t.g},function(t){o=t.g}],execute:function(){var u=":host{display:block}:host .actions{display:-ms-flexbox;display:flex;gap:8px}:host .actions_select{width:74px}";var r=t("bds_pagination",function(){function t(t){var i=this;e(this,t);this.bdsPaginationChange=n(this,"bdsPaginationChange",7);this.previewPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.value-1}};this.nextPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.value+1}};this.firstPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.paginationNumbers[0]}};this.lastPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.pages}};this.openOptions=function(){i.openSelect=!i.openSelect};this.onBlur=function(){i.openSelect=false};this.value=this.startedPage;this.openSelect=undefined;this.paginationNumbers=[];this.intoView=null;this.pages=undefined;this.startedPage=undefined;this.optionsPosition="auto";this.dtButtonInitial=null;this.dtButtonPrev=null;this.dtSelectNumber=null;this.dtButtonNext=null;this.dtButtonEnd=null}t.prototype.componentWillLoad=function(){this.countPage();this.intoView=o(this.el)};t.prototype.pagesChanged=function(){this.countPage()};t.prototype.valueChanged=function(){this.bdsPaginationChange.emit(this.value)};t.prototype.countPage=function(){if(this.paginationNumbers.length!==0){this.paginationNumbers=[]}if(this.paginationNumbers.length===0){for(var t=1;t<=this.pages;t++){this.paginationNumbers.push(t)}if(this.startedPage&&this.startedPage<this.pages){this.value=this.startedPage}else{this.value=this.paginationNumbers[0]}}};t.prototype.optionSelected=function(t){this.value=t;this.openOptions()};t.prototype.render=function(){var t=this;return i(s,null,i("div",{class:"actions"},i("bds-button-icon",{onBdsClick:function(e){return t.firstPage(e)},size:"short",variant:"secondary",icon:"arrow-first",dataTest:this.dtButtonInitial}),i("bds-button-icon",{onBdsClick:function(e){return t.previewPage(e)},size:"short",variant:"secondary",icon:"arrow-left",dataTest:this.dtButtonPrev}),i("bds-select",{class:"actions_select",value:this.value,"options-position":this.optionsPosition},this.paginationNumbers.map((function(e,n){return i("bds-select-option",{key:n,value:e,onClick:function(){return t.optionSelected(e)}},e)}))),i("bds-button-icon",{onBdsClick:function(e){return t.nextPage(e)},size:"short",variant:"secondary",icon:"arrow-right",dataTest:this.dtButtonNext}),i("bds-button-icon",{onBdsClick:function(e){return t.lastPage(e)},size:"short",variant:"secondary",icon:"arrow-last",dataTest:this.dtButtonEnd})))};Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{pages:["pagesChanged"],startedPage:["pagesChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return t}());r.style=u}}}));