System.register(["./index-83dd9303.system.js","./position-element-0c0968bc.system.js"],(function(t){"use strict";var i,s,n,e,a,c;return{setters:[function(t){i=t.r;s=t.a;n=t.h;e=t.e;a=t.g},function(t){c=t.g}],execute:function(){var o=":host{display:block}:host .actions{display:-ms-flexbox;display:flex;gap:8px}:host .actions_select{width:74px}";var h=t("bds_pagination",function(){function t(t){var n=this;i(this,t);this.bdsPaginationChange=s(this,"bdsPaginationChange",7);this.previewPage=function(t){var i=n.value;if(i>1){t.preventDefault();n.value=n.value-1}};this.nextPage=function(t){var i=n.value;if(i<n.pages){t.preventDefault();n.value=n.value+1}};this.firstPage=function(t){var i=n.value;if(i>1){t.preventDefault();n.value=n.paginationNumbers[0]}};this.lastPage=function(t){var i=n.value;if(i<n.pages){t.preventDefault();n.value=n.pages}};this.openOptions=function(){n.openSelect=!n.openSelect};this.onBlur=function(){n.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=c(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 n(e,{key:"6d809302f56f178e05b342fa1c8f38e71fae1b03"},n("div",{key:"92aa0223d828d85a89c86bdae6e576b0287741ad",class:"actions"},n("bds-button-icon",{key:"a58e27370c6a1de98586436905b55d1fd88eab35",onBdsClick:function(i){return t.firstPage(i)},size:"short",variant:"secondary",icon:"arrow-first",dataTest:this.dtButtonInitial}),n("bds-button-icon",{key:"e97a7282e7c839c1c4a8b7db04612ccfd73a153e",onBdsClick:function(i){return t.previewPage(i)},size:"short",variant:"secondary",icon:"arrow-left",dataTest:this.dtButtonPrev}),n("bds-select",{key:"e6205ce289890db171572f7aa30a0cbc7fe3ecbf",class:"actions_select",value:this.value,"options-position":this.optionsPosition},this.paginationNumbers.map((function(i,s){return n("bds-select-option",{key:s,value:i,onClick:function(){return t.optionSelected(i)}},i)}))),n("bds-button-icon",{key:"8f65ea30b5a88e379170dcd366b753fcddd8e1fe",onBdsClick:function(i){return t.nextPage(i)},size:"short",variant:"secondary",icon:"arrow-right",dataTest:this.dtButtonNext}),n("bds-button-icon",{key:"75636ade2a47f0c98b08b51f2a16acd16f8fba32",onBdsClick:function(i){return t.lastPage(i)},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}());h.style=o}}}));
//# sourceMappingURL=bds-pagination.system.entry.js.map