export const __webpack_esm_id__=33315;export const __webpack_esm_ids__=[9582,33315];export const __webpack_esm_modules__={9582(){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",["$translate","$rootScope","$compile",function(e,a,i){return{link:function(e,t){const s=()=>{const a=i('<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true" first-text="{{\'paginator.first.page.label\' | translate}}" last-text="{{\'paginator.last.page.label\' | translate}}"></uib-pagination>')(e);t.html(a)};s();const n=a.$on("$translateChangeSuccess",s);e.$on("$destroy",n)}}}])},33315(e,a,i){i(98416),i(9582);var t=i(16514),s=i(65399),n=i(57154);function r(e,a,i,r,o,g){e.guides=[],e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.translationSubscription=void 0,e.startGuide=e=>{(0,n.service)(n.GuidesService).startGuide(e,i.getServices())},e.changePagination=()=>{angular.isDefined(e.guides)&&(e.displayedGuides=e.guides.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){e.page=1,e.pageSize=a||e.pageSizeOptions[0],e.changePagination()};const c=()=>{e.guides.forEach(e=>{switch(e.guideLevel){case void 0:case s.zC.BEGINNER:e.guideLevelLabel="view.guides.level.beginner";break;case s.zC.INTERMEDIATE:e.guideLevelLabel="view.guides.level.intermediate";break;default:e.guideLevelLabel="view.guides.level.advanced"}})},d=()=>{e.guides.forEach(e=>{e.translatedGuideName=t._.translateLocalMessage(o,g,e.guideName),e.translatedGuideDescription=t._.translateLocalMessage(o,g,e.guideDescription)})},l=[];l.push(a.$on("$translateChangeSuccess",d)),l.push(e.$on("$destroy",()=>{l.forEach(e=>e())})),(0,n.service)(n.GuidesService).getGuides().then(a=>{e.guides=r("orderBy")(a,"guideOrder"),c(),e.matchedElements=e.guides,e.changePagination()}).then(d)}angular.module("graphdb.framework.guides.controllers",["ui.bootstrap","graphdb.framework.guides.services","graphdb.framework.core.directives.paginations"]).controller("GuidesCtrl",r),r.$inject=["$scope","$rootScope","GuidesService","$filter","$translate","$interpolate"]}};
//# sourceMappingURL=33315.2d313db6909245acf74b.bundle.js.map