/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { PaginationService } from './pagination.service';
var PaginationNumberComponent = /** @class */ (function () {
    function PaginationNumberComponent(paginationService) {
        var _this = this;
        this.paginationService = paginationService;
        /**
         * \@option set ifPreventDefault | ''
         */
        this.ifPreventDefault = false;
        this.isCurrent = false;
        this.isFocus = false;
        this.ngClassA = {
            'pagination_li_a': true,
            'pagination_li_a_focus': false
        };
        this.build = (/**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var s = _this.paginationService;
            _this.myHref = s.getHref(_this.index);
            _this.isCurrent = s.isCurrent(_this.index);
        });
        this.handleClick = (/**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            _this.paginationService.focus(_this.index);
            _this.paginationService.select(_this.index);
            event.stopPropagation();
            if (_this.ifPreventDefault) {
                event.preventDefault();
            }
        });
        this.paginationService.current$.subscribe((/**
         * @return {?}
         */
        function () {
            _this.build();
        }));
        this.paginationService.focused$.subscribe((/**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            _this.isFocus = v === _this.index;
            _this.ngClassA.pagination_li_a_focus = _this.isFocus;
        }));
    }
    /**
     * @return {?}
     */
    PaginationNumberComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.build();
    };
    PaginationNumberComponent.decorators = [
        { type: Component, args: [{
                    selector: 'md-pagination-number',
                    template: "\n    <a [ngClass]='ngClassA' *ngIf=\"!isCurrent;else other_content\"\n    [href]='myHref'\n    [attr.aria-label]=\"'Page '+index\"\n    (click)='handleClick($event)'\n    >{{ index }}</a>\n    <ng-template #other_content>{{ index }}</ng-template>\n  ",
                    host: {
                        'class': 'pagination_li',
                        '[class.pagination_current]': 'isCurrent',
                        '[class.pagination_li_focus]': 'isCurrent && isFocus'
                    },
                    styles: [".ellipsis{width:11px;height:16px;color:#666;font-size:12px;font-family:CiscoSans;text-align:center;letter-spacing:0}.pagination_li{display:block;float:left;font-size:12px;margin:0 20px 0 0;height:20px;line-height:20px;min-width:20px;border-radius:10px!important;text-align:center!important}.pagination_li_last{margin-right:0}.pagination_li_a{transition:background-color .3s ease-out;display:block;font-size:12px;color:#05a1bf;border-radius:10px!important;text-align:center!important;padding:0 4px;line-height:20px}.pagination_current,.pagination_li_a:focus,.pagination_li_a:hover{background:#07c1e4;color:#fff;padding:0 4px}.pagination_disable{color:rgba(0,0,0,.4);padding:0 4px}.pagination_li_a_focus,.pagination_li_focus{border-color:transparent;outline:0;box-shadow:0 0 4px 2px rgba(0,160,209,.75)}"]
                }] }
    ];
    /** @nocollapse */
    PaginationNumberComponent.ctorParameters = function () { return [
        { type: PaginationService }
    ]; };
    PaginationNumberComponent.propDecorators = {
        index: [{ type: Input }],
        ifPreventDefault: [{ type: Input }]
    };
    return PaginationNumberComponent;
}());
export { PaginationNumberComponent };
if (false) {
    /**
     * \@option set index | ''
     * @type {?}
     */
    PaginationNumberComponent.prototype.index;
    /**
     * \@option set ifPreventDefault | ''
     * @type {?}
     */
    PaginationNumberComponent.prototype.ifPreventDefault;
    /** @type {?} */
    PaginationNumberComponent.prototype.myHref;
    /** @type {?} */
    PaginationNumberComponent.prototype.isCurrent;
    /** @type {?} */
    PaginationNumberComponent.prototype.isFocus;
    /** @type {?} */
    PaginationNumberComponent.prototype.ngClassA;
    /**
     * @type {?}
     * @private
     */
    PaginationNumberComponent.prototype.build;
    /** @type {?} */
    PaginationNumberComponent.prototype.handleClick;
    /**
     * @type {?}
     * @private
     */
    PaginationNumberComponent.prototype.paginationService;
}
//# sourceMappingURL=data:application/json;base64, 