import { Component, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, HostListener, Directive, Optional, Host, Input, InjectionToken, EventEmitter, forwardRef, ViewChild, Output, ContentChild, Self, HostBinding, Inject, TemplateRef, ViewContainerRef, Renderer2, ChangeDetectorRef, NgZone, Pipe, NgModule } from '@angular/core';
import { trigger, transition, style, animate } from '@angular/animations';
import { BehaviorSubject, fromEvent, merge, EMPTY, of } from 'rxjs';
import { __awaiter } from 'tslib';
import { mixinDisabled, mixinGrouped, ImageConverter, mixinFocused, mixinReadonly, mixinRequired, mixinError, mixinHideErrors, coerceBooleanProperty, Platform, mixinLoad } from '@bravobit/bb-foundation';
import { NG_VALUE_ACCESSOR, NgControl, FormGroupDirective } from '@angular/forms';
import { map, mapTo, startWith, distinctUntilChanged, share, switchMap, tap, delay } from 'rxjs/operators';
import { LocalizeModule } from '@bravobit/bb-foundation/localize';
import { DomSanitizer } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';

/**
 * @fileoverview added by tsickle
 * Generated from: lib/dropdown/dropdown.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbDropdown {
    /**
     * @param {?} _elementRef
     */
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        // State.
        this.visible$ = new BehaviorSubject(false);
    }
    /**
     * @return {?}
     */
    toggle() {
        return this.visible$.next(!this.visible$.getValue());
    }
    /**
     * @return {?}
     */
    close() {
        return this.visible$.next(false);
    }
    /**
     * @param {?} target
     * @return {?}
     */
    onDocumentClick(target) {
        if (!target) {
            return;
        }
        if (this._elementRef.nativeElement.contains(target)) {
            return;
        }
        return this.close();
    }
}
BbDropdown.decorators = [
    { type: Component, args: [{
                selector: 'bb-dropdown',
                template: "<button (click)=\"toggle()\"\r\n        [class.opened]=\"visible$ | async\"\r\n        type=\"button\">\r\n    <ng-content></ng-content>\r\n</button>\r\n\r\n<div *ngIf=\"visible$ | async\"\r\n     [@dropdownMenuAnimation]=\"true\"\r\n     class=\"bb-dropdown-menu\"\r\n     role=\"list\">\r\n    <ng-content select=\"[bbDropdownItem], hr\"></ng-content>\r\n</div>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: { 'class': 'bb-dropdown' },
                preserveWhitespaces: false,
                animations: [
                    trigger('dropdownMenuAnimation', [
                        transition(':enter', [
                            // 1. Set the initial state.
                            style({ opacity: 0, transform: 'scale(0.9)' }),
                            // 2. Start the animation to show the item.
                            animate('80ms cubic-bezier(0, 0, .2, 1)', style({ opacity: 1, transform: 'scale(1)' }))
                        ]),
                        transition(':leave', [
                            // 1. Set the initial state.
                            style({ opacity: 1, transform: 'scale(1)' }),
                            // 2. Start the animation to hide the item.
                            animate('80ms cubic-bezier(0, 0, .2, 1)', style({ opacity: 0, transform: 'scale(0.9)' }))
                        ])
                    ])
                ],
                styles: [".bb-dropdown{position:relative;display:inline-block}.bb-dropdown.right>.bb-dropdown-menu{right:0;left:auto;-ms-transform-origin:top right;transform-origin:top right}.bb-dropdown-menu{left:0;top:100%;padding:0;z-index:10;display:block;margin:10px 0 0;border-radius:4px;position:absolute;list-style-type:none;background-color:#fff;border:1px solid #ccc;-ms-transform-origin:top left;transform-origin:top left;box-shadow:0 0 6px 0 rgba(0,0,0,.1)}.bb-dropdown-menu:after{width:0;top:-5px;height:0;right:5px;content:\"\";position:absolute;border-style:solid;border-width:0 10px 5px;border-color:transparent transparent #d9d9d9}.bb-dropdown-menu>hr{margin:0;height:1px;border:none;background-color:#ccc}.bb-dropdown-item{width:100%;border:none;line-height:1;display:block;cursor:pointer;text-align:left;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:12px 20px;white-space:nowrap;text-decoration:none;color:#676767!important;background-color:transparent;transition:background-color 250ms cubic-bezier(0,0,.2,1)}.bb-dropdown-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.bb-dropdown-item:hover{background-color:#f6f6f6}.bb-dropdown-item:focus{box-shadow:0 0 0 3px rgba(220,224,233,.5)}.bb-dropdown-item:active{background-color:#f0f0f0}"]
            }] }
];
/** @nocollapse */
BbDropdown.ctorParameters = () => [
    { type: ElementRef }
];
BbDropdown.propDecorators = {
    onDocumentClick: [{ type: HostListener, args: ['document:click', ['$event.target'],] }]
};
if (false) {
    /** @type {?} */
    BbDropdown.prototype.visible$;
    /**
     * @type {?}
     * @private
     */
    BbDropdown.prototype._elementRef;
}
class BbDropdownItem {
    /**
     * @param {?} _parent
     */
    constructor(_parent) {
        this._parent = _parent;
        // Inputs.
        this.closeOnClick = true;
    }
    /**
     * @return {?}
     */
    onClick() {
        if (!this.closeOnClick) {
            return;
        }
        this._parent && this._parent.close();
    }
}
BbDropdownItem.decorators = [
    { type: Directive, args: [{
                selector: '[bbDropdownItem]',
                host: { 'class': 'bb-dropdown-item' }
            },] }
];
/** @nocollapse */
BbDropdownItem.ctorParameters = () => [
    { type: BbDropdown, decorators: [{ type: Optional }, { type: Host }] }
];
BbDropdownItem.propDecorators = {
    closeOnClick: [{ type: Input }],
    onClick: [{ type: HostListener, args: ['click',] }]
};
if (false) {
    /** @type {?} */
    BbDropdownItem.prototype.closeOnClick;
    /**
     * @type {?}
     * @private
     */
    BbDropdownItem.prototype._parent;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/elements.interfaces.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
const ELEMENTS_ICONS = new InjectionToken('elements_icons');
/** @type {?} */
const ELEMENTS_ERRORS = new InjectionToken('elements_errors');
/**
 * @record
 */
function ElementsIconFont() { }
if (false) {
    /** @type {?} */
    ElementsIconFont.prototype.namespace;
    /** @type {?} */
    ElementsIconFont.prototype.className;
    /** @type {?|undefined} */
    ElementsIconFont.prototype.inline;
    /** @type {?} */
    ElementsIconFont.prototype.type;
}
/**
 * @record
 */
function ElementsIconImage() { }
if (false) {
    /** @type {?} */
    ElementsIconImage.prototype.namespace;
    /** @type {?} */
    ElementsIconImage.prototype.name;
    /** @type {?} */
    ElementsIconImage.prototype.src;
    /** @type {?} */
    ElementsIconImage.prototype.type;
}
/**
 * @record
 */
function ElementsIconUnknown() { }
if (false) {
    /** @type {?} */
    ElementsIconUnknown.prototype.type;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/image-picker/image-picker.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbImagePickerBase {
}
/** @type {?} */
const BbImagePickerMixinBase = mixinDisabled(mixinGrouped(BbImagePickerBase));
class BbImagePicker extends BbImagePickerMixinBase {
    /**
     * @param {?} _converter
     */
    constructor(_converter) {
        super();
        this._converter = _converter;
        // Inputs.
        this.label = null;
        this.placeholder = null;
        this.styleDimensions = null;
        this.cropDimensions = null;
        // Form.
        this._value$ = new BehaviorSubject(null);
        this.valueChange = new EventEmitter();
        this.onTouchedCallback = (/**
         * @return {?}
         */
        () => {
        });
        this.onChangeCallback = (/**
         * @return {?}
         */
        () => {
        });
    }
    /**
     * @return {?}
     */
    get value() {
        return this._value$.getValue();
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set value(value) {
        this._value$.next(value);
        this.valueChange.emit(value);
    }
    /**
     * @return {?}
     */
    get image() {
        return this._value$.pipe(map((/**
         * @param {?} value
         * @return {?}
         */
        value => value || this.placeholder)), map((/**
         * @param {?} value
         * @return {?}
         */
        value => value ? `url(${value})` : null)));
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onFileChange(event) {
        return __awaiter(this, void 0, void 0, function* () {
            // Grab the file from the event.
            /** @type {?} */
            const file = event.target.files[0];
            // Check if the file exists.
            if (!file || this.disabled) {
                return;
            }
            try {
                this.value = yield this._converter.toDataUri(file, this.cropDimensions);
            }
            catch (error) {
                this.value = null;
            }
            this.onChangeCallback(this.value);
            if (this.fileInput && this.fileInput.nativeElement) {
                this.fileInput.nativeElement.value = '';
            }
        });
    }
    /**
     * @return {?}
     */
    openFilePicker() {
        if (this.disabled) {
            return;
        }
        // Execute a click on the file input.
        this.fileInput
            && this.fileInput.nativeElement
            && this.fileInput.nativeElement.click
            && this.fileInput.nativeElement.click();
    }
    /**
     * @param {?} value
     * @return {?}
     */
    writeValue(value) {
        this.value = value;
    }
    /**
     * @param {?} method
     * @return {?}
     */
    registerOnChange(method) {
        this.onChangeCallback = method;
    }
    /**
     * @param {?} method
     * @return {?}
     */
    registerOnTouched(method) {
        this.onTouchedCallback = method;
    }
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
    }
}
BbImagePicker.decorators = [
    { type: Component, args: [{
                selector: 'bb-image-picker',
                template: "<!-- The input that can open the file picker. -->\r\n<input #fileInput\r\n       (change)=\"onFileChange($event)\"\r\n       class=\"bb-image-picker-input\"\r\n       type=\"file\"\r\n       tabindex=\"-1\"\r\n       accept=\"image/*\">\r\n\r\n<span [style.width]=\"styleDimensions?.width || '100%'\"\r\n      [style.height]=\"styleDimensions?.height || '215px'\"\r\n      [style.background-image]=\"image | async\"\r\n      class=\"bb-image-input-image\">\r\n    </span>\r\n\r\n<button *ngIf=\"label as labelText\"\r\n        (click)=\"openFilePicker()\"\r\n        bb-button\r\n        class=\"bb-image-input-button\"\r\n        type=\"button\">\r\n    {{ labelText }}\r\n</button>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: {
                    'class': 'bb-image-picker',
                    '[class.disabled]': 'disabled',
                    '[class.grouped]': 'grouped'
                },
                inputs: ['grouped', 'disabled'],
                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((/**
                         * @return {?}
                         */
                        () => BbImagePicker)), multi: true }],
                preserveWhitespaces: false,
                styles: [".bb-image-picker{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}.bb-image-picker.circle>.bb-image-input-image{border-radius:50%}.bb-image-picker.grouped{margin-bottom:20px}.bb-image-picker.disabled{opacity:.5;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.bb-image-picker-input{opacity:0;z-index:-1;width:.1px;height:.1px;overflow:hidden;position:absolute}.bb-image-input-image{display:-ms-flexbox;display:flex;cursor:default;position:relative;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) center center/cover no-repeat rgba(0,0,0,.2)}.bb-image-input-button{margin-top:10px}"]
            }] }
];
/** @nocollapse */
BbImagePicker.ctorParameters = () => [
    { type: ImageConverter }
];
BbImagePicker.propDecorators = {
    fileInput: [{ type: ViewChild, args: ['fileInput', { static: true },] }],
    label: [{ type: Input }],
    placeholder: [{ type: Input }],
    styleDimensions: [{ type: Input }],
    cropDimensions: [{ type: Input }],
    value: [{ type: Input }],
    valueChange: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    BbImagePicker.prototype.fileInput;
    /** @type {?} */
    BbImagePicker.prototype.label;
    /** @type {?} */
    BbImagePicker.prototype.placeholder;
    /** @type {?} */
    BbImagePicker.prototype.styleDimensions;
    /** @type {?} */
    BbImagePicker.prototype.cropDimensions;
    /**
     * @type {?}
     * @private
     */
    BbImagePicker.prototype._value$;
    /** @type {?} */
    BbImagePicker.prototype.valueChange;
    /** @type {?} */
    BbImagePicker.prototype.onTouchedCallback;
    /** @type {?} */
    BbImagePicker.prototype.onChangeCallback;
    /**
     * @type {?}
     * @private
     */
    BbImagePicker.prototype._converter;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/form-control/form-control.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
let nextUniqueId = 0;
class BbFormControlBase {
}
/** @type {?} */
const BbFormControlMixinBase = mixinDisabled(mixinFocused(mixinReadonly(mixinGrouped(mixinRequired(mixinError(mixinHideErrors(BbFormControlBase)))))));
class BbFormControl extends BbFormControlMixinBase {
    constructor() {
        super(...arguments);
        // Inputs.
        this.label = null;
        this.hint = null;
        // Data.
        this.arrow = false;
        // Data.
        this.labelId = `bb-form-control-${nextUniqueId++}`;
    }
    /**
     * @param {?} error
     * @return {?}
     */
    onErrorChange(error) {
        this.error = !!error;
    }
}
BbFormControl.decorators = [
    { type: Component, args: [{
                selector: 'bb-form-control',
                template: "<!-- Label of the form control. -->\r\n<label *ngIf=\"label as labelContent\"\r\n       [attr.for]=\"labelId\"\r\n       class=\"bb-form-control-label\">\r\n    <ng-template [bbTemplate]=\"labelContent\">\r\n        {{ labelContent }}\r\n    </ng-template>\r\n</label>\r\n\r\n<!-- The input with the addons. -->\r\n<div class=\"bb-form-control-container\">\r\n    <ng-content select=\"[bbPrefix]\"></ng-content>\r\n    <ng-content select=\"[bbInput]\"></ng-content>\r\n    <ng-content select=\"[bbSuffix]\"></ng-content>\r\n</div>\r\n\r\n<!-- The error component. -->\r\n<bb-form-error *ngIf=\"!hideErrors\"\r\n               [control]=\"ngControl\"\r\n               (errorChange)=\"onErrorChange($event)\">\r\n</bb-form-error>\r\n\r\n<!-- The form control hint. -->\r\n<p *ngIf=\"hint as hintContent\"\r\n   class=\"bb-form-control-hint\">\r\n    <ng-template [bbTemplate]=\"hintContent\">\r\n        {{ hintContent }}\r\n    </ng-template>\r\n</p>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: {
                    'class': 'bb-form-control',
                    '[class.readonly]': 'readonly',
                    '[class.required]': 'required',
                    '[class.disabled]': 'disabled',
                    '[class.focused]': 'focused',
                    '[class.grouped]': 'grouped',
                    '[class.arrow]': 'arrow',
                    '[class.error]': 'error'
                },
                inputs: ['grouped', 'hideErrors'],
                preserveWhitespaces: false,
                styles: [".bb-form-control{color:#2d3c4d;display:block}.bb-form-control>.bb-form-control-container>.bb-prefix,.bb-form-control>.bb-form-control-container>.bb-suffix{margin:0 8px;color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control.grouped{margin-bottom:20px}.bb-form-control.small{max-width:240px}.bb-form-control.medium{max-width:480px}.bb-form-control.large{max-width:720px}.bb-form-control.required>.bb-form-control-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bb-form-control.disabled>.bb-form-control-container{cursor:default;pointer-events:none;background-color:rgba(204,204,204,.64)}.bb-form-control.disabled>.bb-form-control-container>input,.bb-form-control.disabled>.bb-form-control-container>select,.bb-form-control.disabled>.bb-form-control-container>textarea{color:#aaa}.bb-form-control.readonly>.bb-form-control-container{cursor:default;border:1px dotted #bdc4c9}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container{background-color:#fff;box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(0,123,255,.2)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::-webkit-input-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::-webkit-input-placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::-moz-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::-moz-placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea:-ms-input-placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::-ms-input-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::-ms-input-placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control.error>.bb-form-control-label{color:#c23934}.bb-form-control.error>.bb-form-control-hint{display:none}.bb-form-control.error>.bb-form-control-container{border:1px solid #962b26;background-color:rgba(194,57,52,.25)!important;box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(194,57,52,.4)!important}.bb-form-control.error>.bb-form-control-container>.bb-prefix,.bb-form-control.error>.bb-form-control-container>.bb-suffix{color:#c23934}.bb-form-control.error>.bb-form-control-container>input::-webkit-input-placeholder,.bb-form-control.error>.bb-form-control-container>textarea::-webkit-input-placeholder{color:rgba(194,57,52,.4)!important}.bb-form-control.error>.bb-form-control-container>input::-moz-placeholder,.bb-form-control.error>.bb-form-control-container>textarea::-moz-placeholder{color:rgba(194,57,52,.4)!important}.bb-form-control.error>.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control.error>.bb-form-control-container>textarea:-ms-input-placeholder{color:rgba(194,57,52,.4)!important}.bb-form-control.error>.bb-form-control-container>input::-ms-input-placeholder,.bb-form-control.error>.bb-form-control-container>textarea::-ms-input-placeholder{color:rgba(194,57,52,.4)!important}.bb-form-control.error>.bb-form-control-container>input::placeholder,.bb-form-control.error>.bb-form-control-container>textarea::placeholder{color:rgba(194,57,52,.4)!important}.bb-form-control.arrow>.bb-form-control-container:after{width:20px;content:\"\";height:36px;display:-ms-flexbox;display:flex;min-width:20px;background-repeat:no-repeat;background-position:calc(100% - 8px) center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAGCAYAAAAYLBS/AAAACXBIWXMAAAsSAAALEgHS3X78AAAAWUlEQVQYlY3QsQ2DMAAEwMMTsAkrZInvWY3WXiIjJJtkA1OBRCIRf/nSffFTrXXGE4uxbCXJBw+8R0CStcAg3JKsUI7mDzzBBd3AC4Cp9/4z21o7znl9A9gBAf4fpjLTwkUAAAAASUVORK5CYII=)}.bb-form-control-container{width:100%;display:-ms-flexbox;display:flex;overflow:hidden;position:relative;border-radius:3px;-ms-flex-align:center;align-items:center;border:1px solid #b6bbc1;background-color:#fff8ff;transition-duration:250ms;transition-property:background-color,box-shadow;transition-timing-function:cubic-bezier(0,0,.2,1);box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1)}.bb-form-control-container>input::-webkit-input-placeholder,.bb-form-control-container>textarea::-webkit-input-placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input::-moz-placeholder,.bb-form-control-container>textarea::-moz-placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control-container>textarea:-ms-input-placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input::-ms-input-placeholder,.bb-form-control-container>textarea::-ms-input-placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input::placeholder,.bb-form-control-container>textarea::placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input,.bb-form-control-container>select,.bb-form-control-container>textarea{margin:0;width:100%;border:none;color:#3d464d;font-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent}.bb-form-control-container>input,.bb-form-control-container>select{height:36px;padding:0 8px}.bb-form-control-container>select::-ms-expand{display:none}.bb-form-control-container>input::-ms-clear,.bb-form-control-container>input::-ms-reveal{width:0;height:0;display:none}.bb-form-control-container>input::-webkit-search-cancel-button,.bb-form-control-container>input::-webkit-search-decoration,.bb-form-control-container>input::-webkit-search-results-button,.bb-form-control-container>input::-webkit-search-results-decoration{display:none}.bb-form-control-container>textarea{resize:none;padding:8px}.bb-form-control-label{color:#000;display:block;position:relative;margin-bottom:4px;transition:color 30ms cubic-bezier(0,0,.2,1)}.bb-form-control-error,.bb-form-control-hint{display:block;font-size:13px;margin-top:4px}.bb-form-control-error{color:#c23934}.bb-form-control-hint{color:#738694}"]
            }] }
];
BbFormControl.propDecorators = {
    ngControl: [{ type: ContentChild, args: [NgControl, { static: false },] }],
    label: [{ type: Input }],
    hint: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    BbFormControl.prototype.ngControl;
    /** @type {?} */
    BbFormControl.prototype.label;
    /** @type {?} */
    BbFormControl.prototype.hint;
    /** @type {?} */
    BbFormControl.prototype.arrow;
    /** @type {?} */
    BbFormControl.prototype.labelId;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/file-picker/file-picker.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
let nextUniqueId$1 = 0;
class BbFilePickerBase {
}
/** @type {?} */
const BbFilePickerMixinBase = mixinRequired(mixinDisabled(mixinGrouped(mixinError(mixinHideErrors(BbFilePickerBase)))));
class BbFilePicker extends BbFilePickerMixinBase {
    constructor() {
        super(...arguments);
        // Inputs.
        this.label = null;
        this.hint = null;
        this.accept = null;
        this.showImages = true;
        this.allowDragging = true;
        // State.
        this.labelId = `bb-file-picker-${nextUniqueId$1++}`;
        this.hovered = false;
        this.value$ = new BehaviorSubject({});
        this.valueChange = new EventEmitter();
        this.onTouchedCallback = (/**
         * @return {?}
         */
        () => {
        });
        this.onChangeCallback = (/**
         * @return {?}
         */
        () => {
        });
        this.saveFile = (/**
         * @param {?=} files
         * @return {?}
         */
        (files) => {
            // Validate the files exist.
            if (!files) {
                return;
            }
            // Retrieve the first file.
            /** @type {?} */
            const file = files[0];
            // Validate the first file exists.
            if (!file) {
                return;
            }
            // Save the file.
            this.value = file;
        });
        this.getFileListFromEvent = (/**
         * @param {?} event
         * @return {?}
         */
        (event) => {
            /** @type {?} */
            const element = (/** @type {?} */ (event.target));
            if (!element) {
                return null;
            }
            return element.files;
        });
        this.preventDefault = (/**
         * @param {?} event
         * @return {?}
         */
        (event) => {
            event.preventDefault();
            event.stopPropagation();
        });
    }
    /**
     * @return {?}
     */
    get value() {
        const { file } = this.value$.getValue();
        return file;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set value(value) {
        this.value$.next({ file: value });
        this.valueChange.emit(value);
    }
    /**
     * @param {?} event
     * @param {?} isHovered
     * @return {?}
     */
    onDrag(event, isHovered) {
        // Validate the input can support drag.
        if (!this.allowDragging || this.disabled) {
            return;
        }
        // Prevent the default event action
        // and start the hovering.
        this.preventDefault(event);
        this.hovered = isHovered;
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onDrop(event) {
        // Validate the input can support drag.
        if (!this.allowDragging || this.disabled) {
            return;
        }
        // Prevent the default event action
        // and stop the hovering.
        this.preventDefault(event);
        this.hovered = false;
        // Save the file.
        this.saveFile(event['dataTransfer'].files);
        // Run the on change callback.
        this.onChangeCallback(this.value);
    }
    /**
     * @param {?=} file
     * @return {?}
     */
    onButtonPressed(file) {
        if (file) {
            this.value = null;
            this.onChangeCallback(this.value);
            return;
        }
        return this.openFilePicker();
    }
    /**
     * @return {?}
     */
    openFilePicker() {
        return this.fileInput
            && this.fileInput.nativeElement
            && this.fileInput.nativeElement.click
            && this.fileInput.nativeElement.click();
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onFileChange(event) {
        // Validate the input is not disabled.
        if (this.disabled) {
            return;
        }
        // Extract the file from the event.
        /** @type {?} */
        const fileList = this.getFileListFromEvent(event);
        // Save the file.
        this.saveFile(fileList);
        // Run the on change callback.
        this.onChangeCallback(this.value);
        // Clear the file input.
        if (this.fileInput && this.fileInput.nativeElement) {
            this.fileInput.nativeElement.value = '';
        }
    }
    /**
     * @param {?} value
     * @return {?}
     */
    writeValue(value) {
        this.value = value;
    }
    /**
     * @param {?} method
     * @return {?}
     */
    registerOnChange(method) {
        this.onChangeCallback = method;
    }
    /**
     * @param {?} method
     * @return {?}
     */
    registerOnTouched(method) {
        this.onTouchedCallback = method;
    }
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
    }
    /**
     * @param {?} error
     * @return {?}
     */
    onErrorChange(error) {
        this.error = !!error;
    }
}
BbFilePicker.decorators = [
    { type: Component, args: [{
                selector: 'bb-file-picker',
                template: "<!-- The label of the input. -->\r\n<label *ngIf=\"label as labelContent\"\r\n       [for]=\"labelId\"\r\n       class=\"bb-file-picker-label\">\r\n    <ng-template [bbTemplate]=\"labelContent\">\r\n        {{ labelContent }}\r\n    </ng-template>\r\n</label>\r\n\r\n<!-- The input that can open the file picker. -->\r\n<input #fileInput\r\n       [accept]=\"accept\"\r\n       [disabled]=\"disabled\"\r\n       (change)=\"onFileChange($event)\"\r\n       class=\"bb-file-picker-input\"\r\n       type=\"file\"\r\n       tabindex=\"-1\">\r\n\r\n<div *ngIf=\"value$ | async as data\"\r\n     class=\"bb-file-picker-wrapper\">\r\n    <!-- The button that accepts files. -->\r\n    <div class=\"bb-file-picker-container\">\r\n        <button [class.destructive]=\"!!data?.file\"\r\n                [class.standalone]=\"!allowDragging\"\r\n                [disabled]=\"disabled\"\r\n                [id]=\"labelId\"\r\n                (click)=\"onButtonPressed(data?.file)\"\r\n                type=\"button\"\r\n                class=\"bb-file-picker-button\">\r\n            <ng-container *ngTemplateOutlet=\"data?.file ? closeIcon : uploadIcon\"></ng-container>\r\n            {{ (data?.file ? 'file-picker.remove' : 'file-picker.choose') | bbLocalize }}\r\n        </button>\r\n        <div *ngIf=\"allowDragging\"\r\n             class=\"bb-file-picker-zone\">\r\n            {{ 'file-picker.drop' | bbLocalize }}\r\n        </div>\r\n    </div>\r\n\r\n    <ng-container *ngIf=\"!!extraTemplate\">\r\n        <ng-container *ngTemplateOutlet=\"extraTemplate; context: {$implicit: data?.file}\"></ng-container>\r\n    </ng-container>\r\n\r\n    <ng-container *ngIf=\"showImages\">\r\n        <div *ngIf=\"data?.file | bbFileImage | async as image\"\r\n             class=\"bb-file-picker-image-container\">\r\n            <div class=\"bb-file-picker-image-wrapper\">\r\n                <div [@bbFilePickerImageAnimation]=\"true\"\r\n                     [style.padding-top.%]=\"image?.aspectRatio * 100\"\r\n                     [style.background-image]=\"image?.background\"\r\n                     class=\"bb-file-picker-image\">\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </ng-container>\r\n\r\n    <!-- Extra information of the file. -->\r\n    <div [class.visible]=\"!!data?.file\"\r\n         class=\"bb-file-picker-info\">\r\n        <span *ngIf=\"data?.file?.name as name\">{{ name }}</span>\r\n        <span *ngIf=\"data?.file?.size as size\">{{ size | bbFileSize }}</span>\r\n    </div>\r\n</div>\r\n\r\n<bb-form-error *ngIf=\"!hideErrors\"\r\n               (errorChange)=\"onErrorChange($event)\">\r\n</bb-form-error>\r\n\r\n<!-- The file picker hint. -->\r\n<p *ngIf=\"hint as hintContent\"\r\n   class=\"bb-file-picker-hint\">\r\n    <ng-template [bbTemplate]=\"hintContent\">\r\n        {{ hintContent }}\r\n    </ng-template>\r\n</p>\r\n\r\n<!-- Upload icon. -->\r\n<ng-template #uploadIcon>\r\n    <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n         class=\"bb-file-picker-icon\"\r\n         width=\"24\"\r\n         height=\"24\">\r\n        <path fill=\"currentColor\"\r\n              d=\"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5a2.5 2.5 0 010-5H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z\"></path>\r\n        <path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path>\r\n    </svg>\r\n</ng-template>\r\n\r\n<!-- Close icon. -->\r\n<ng-template #closeIcon>\r\n    <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n         class=\"bb-file-picker-icon\"\r\n         width=\"24\"\r\n         height=\"24\">\r\n        <path fill=\"currentColor\"\r\n              d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path>\r\n        <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n    </svg>\r\n</ng-template>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef((/**
                         * @return {?}
                         */
                        () => BbFilePicker)),
                        multi: true
                    }
                ],
                host: {
                    'class': 'bb-file-picker',
                    '[class.required]': 'required',
                    '[class.disabled]': 'disabled',
                    '[class.grouped]': 'grouped',
                    '[class.hovered]': 'hovered',
                    '[class.error]': 'error'
                },
                animations: [
                    trigger('bbFilePickerImageAnimation', [
                        transition(':enter', [
                            style({ opacity: 0 }),
                            animate('200ms', style({ opacity: 1 }))
                        ]),
                        transition(':leave', [
                            animate('200ms', style({ opacity: 0 }))
                        ])
                    ])
                ],
                inputs: ['disabled', 'hideErrors', 'grouped', 'required'],
                preserveWhitespaces: false,
                styles: [".bb-file-picker{display:block}.bb-file-picker.disabled>.bb-file-picker-wrapper{cursor:default;background-color:rgba(204,204,204,.64)}.bb-file-picker.grouped{margin-bottom:20px}.bb-file-picker.full>.bb-file-picker-wrapper{width:100%}.bb-file-picker:not(.disabled) .bb-file-picker-button{background-color:#fff}.bb-file-picker:not(.disabled).hovered>.bb-file-picker-wrapper,.bb-file-picker:not(.disabled):focus>.bb-file-picker-wrapper{box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(0,123,255,.2)}.bb-file-picker.required>.bb-file-picker-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bb-file-picker.error>.bb-file-picker-label{color:#c23934}.bb-file-picker.error>.bb-file-picker-hint{display:none}.bb-file-picker.error>.bb-file-picker-wrapper{border:1px solid #962b26;background-color:rgba(194,57,52,.25)!important;box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(194,57,52,.4)!important}.bb-file-picker.error .bb-file-picker-button{background-color:transparent}.bb-file-picker-wrapper{max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;border:1px solid #b6bbc1;background-color:#fff8ff;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:inset 0 3px 0 0 rgba(183,188,194,.2),0 6px 6px -6px rgba(0,0,0,.1)}.bb-file-picker-label{color:#000;display:block;position:relative;margin-bottom:4px}.bb-file-picker-input{opacity:0;z-index:-1;width:.1px;height:.1px;overflow:hidden;position:absolute}.bb-file-picker-container{min-height:38px;display:-ms-inline-flexbox;display:inline-flex}.bb-file-picker-button{margin:0;z-index:1;border:none;color:#2196f3;line-height:1;cursor:pointer;padding:0 12px;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;-ms-flex-align:center;align-items:center;white-space:nowrap;display:-ms-inline-flexbox;display:inline-flex;border-top-left-radius:3px;border-bottom-left-radius:3px;border-right:1px solid #b6bbc1;background-color:rgba(255,255,255,.5);transition:box-shadow .2s cubic-bezier(0,0,.2,1)}.bb-file-picker-button:focus{box-shadow:0 0 0 3px rgba(0,123,255,.2)}.bb-file-picker-button:disabled{cursor:default}.bb-file-picker-button.destructive{color:#f55656}.bb-file-picker-button.standalone{width:100%;border-right:none;border-top-right-radius:3px;border-bottom-right-radius:3px}.bb-file-picker-icon{margin-right:4px}.bb-file-picker-zone{-ms-flex:1;flex:1;color:#848f99;font-size:14px;padding:8px 12px;line-height:18px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center}.bb-file-picker-info{height:0;color:#848f99;padding:0 12px;overflow:hidden;line-height:36px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;background-color:#fff8ff;border-top:0 solid #b6bbc1;transition:height .2s cubic-bezier(0,0,.2,1)}.bb-file-picker-info.visible{height:38px;border-top-width:1px}.bb-file-picker-info>span{opacity:.4;max-width:100%;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-file-picker-info>span:first-child{-ms-flex:1;flex:1}.bb-file-picker-info>span:last-child{margin-left:12px}.bb-file-picker-image-container{overflow:hidden;border-top:1px solid #b6bbc1}.bb-file-picker-image-wrapper{width:100%;max-width:40%;margin:20px auto}.bb-file-picker-image{width:100%;display:-ms-flexbox;display:flex;overflow:hidden;position:relative;border-radius:4px;will-change:opacity;background-size:cover;background-position:center;background-repeat:no-repeat}.bb-file-picker-hint{display:block;color:#738694;font-size:13px;margin-top:4px}"]
            }] }
];
BbFilePicker.propDecorators = {
    fileInput: [{ type: ViewChild, args: ['fileInput', { static: true },] }],
    extraTemplate: [{ type: ContentChild, args: ['extra', { static: false },] }],
    label: [{ type: Input }],
    hint: [{ type: Input }],
    accept: [{ type: Input }],
    showImages: [{ type: Input }],
    allowDragging: [{ type: Input }],
    value: [{ type: Input }],
    valueChange: [{ type: Output }],
    onDrag: [{ type: HostListener, args: ['dragover', ['$event', 'true'],] }, { type: HostListener, args: ['dragleave', ['$event', 'false'],] }],
    onDrop: [{ type: HostListener, args: ['drop', ['$event'],] }]
};
if (false) {
    /** @type {?} */
    BbFilePicker.prototype.fileInput;
    /** @type {?} */
    BbFilePicker.prototype.extraTemplate;
    /** @type {?} */
    BbFilePicker.prototype.label;
    /** @type {?} */
    BbFilePicker.prototype.hint;
    /** @type {?} */
    BbFilePicker.prototype.accept;
    /** @type {?} */
    BbFilePicker.prototype.showImages;
    /** @type {?} */
    BbFilePicker.prototype.allowDragging;
    /** @type {?} */
    BbFilePicker.prototype.labelId;
    /** @type {?} */
    BbFilePicker.prototype.hovered;
    /** @type {?} */
    BbFilePicker.prototype.value$;
    /** @type {?} */
    BbFilePicker.prototype.valueChange;
    /** @type {?} */
    BbFilePicker.prototype.onTouchedCallback;
    /** @type {?} */
    BbFilePicker.prototype.onChangeCallback;
    /**
     * @type {?}
     * @private
     */
    BbFilePicker.prototype.saveFile;
    /**
     * @type {?}
     * @private
     */
    BbFilePicker.prototype.getFileListFromEvent;
    /**
     * @type {?}
     * @private
     */
    BbFilePicker.prototype.preventDefault;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/addon.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbSuffix {
}
BbSuffix.decorators = [
    { type: Directive, args: [{
                selector: '[bbSuffix]',
                host: {
                    'class': 'bb-suffix'
                }
            },] }
];
class BbPrefix {
}
BbPrefix.decorators = [
    { type: Directive, args: [{
                selector: '[bbPrefix]',
                host: {
                    'class': 'bb-prefix'
                }
            },] }
];

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/form-submit.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFormSubmit {
    /**
     * @param {?} _host
     * @param {?} _formDirective
     */
    constructor(_host, _formDirective) {
        this._host = _host;
        this._formDirective = _formDirective;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        // Submit changes.
        /** @type {?} */
        const regularSubmitChanges$ = fromEvent(this.nativeElement, 'submit').pipe(mapTo(true));
        // Reactive form submit changes.
        /** @type {?} */
        const reactiveSubmitChanges$ = this.reactiveSubmitChanges();
        // Reset changes.
        /** @type {?} */
        const resetChanges$ = fromEvent(this.nativeElement, 'reset').pipe(mapTo(false));
        // Listen to the submit status.
        this.submitStatus$ = merge(regularSubmitChanges$, reactiveSubmitChanges$, resetChanges$).pipe(startWith(false), distinctUntilChanged(), share());
    }
    /**
     * @return {?}
     */
    submit() {
        if (!this._formDirective) {
            return;
        }
        this._formDirective.ngSubmit.emit();
    }
    /**
     * @return {?}
     */
    reset() {
        return this.nativeElement.reset();
    }
    /**
     * @private
     * @return {?}
     */
    get nativeElement() {
        return this._host && this._host.nativeElement;
    }
    /**
     * @private
     * @return {?}
     */
    reactiveSubmitChanges() {
        if (!this._formDirective) {
            return EMPTY;
        }
        return this._formDirective.ngSubmit.pipe(mapTo(true));
    }
}
BbFormSubmit.decorators = [
    { type: Directive, args: [{
                selector: 'form',
                exportAs: 'bbForm'
            },] }
];
/** @nocollapse */
BbFormSubmit.ctorParameters = () => [
    { type: ElementRef },
    { type: FormGroupDirective, decorators: [{ type: Optional }, { type: Self }] }
];
if (false) {
    /** @type {?} */
    BbFormSubmit.prototype.submitStatus$;
    /**
     * @type {?}
     * @private
     */
    BbFormSubmit.prototype._host;
    /**
     * @type {?}
     * @private
     */
    BbFormSubmit.prototype._formDirective;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/input.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbSelect {
    /**
     * @param {?} _elementRef
     * @param {?} _ngControl
     * @param {?} _formControl
     */
    constructor(_elementRef, _ngControl, _formControl) {
        this._elementRef = _elementRef;
        this._ngControl = _ngControl;
        this._formControl = _formControl;
        this.hasArrow = true;
        this._disabled = false;
        this._required = false;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        // Set an arrow on the form control if
        // it requires one.
        this._formControl.arrow = this.hasArrow;
    }
    /**
     * @return {?}
     */
    ngDoCheck() {
        if (this._ngControl) {
            this.disabled = this._ngControl.disabled;
        }
    }
    /**
     * @return {?}
     */
    ngOnDestroy() {
        this._subscription && this._subscription.unsubscribe();
    }
    /**
     * @return {?}
     */
    focus() {
        return this._elementRef
            && this._elementRef.nativeElement
            && this._elementRef.nativeElement.focus
            && this._elementRef.nativeElement.focus();
    }
    /**
     * @param {?} hasFocus
     * @return {?}
     */
    setFocus(hasFocus) {
        if (!this._formControl) {
            return;
        }
        this._formControl.focused = hasFocus;
    }
    /**
     * @return {?}
     */
    get id() {
        return this._formControl && this._formControl.labelId;
    }
    /**
     * @return {?}
     */
    get disabled() {
        if (this._ngControl && this._ngControl.disabled !== null) {
            return this._ngControl.disabled;
        }
        return this._disabled;
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    set disabled(newValue) {
        this._disabled = coerceBooleanProperty(newValue);
        if (!this._formControl) {
            return;
        }
        this._formControl.disabled = this._disabled;
    }
    /**
     * @return {?}
     */
    get required() {
        return this._required;
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    set required(newValue) {
        this._required = coerceBooleanProperty(newValue);
        if (!this._formControl) {
            return;
        }
        this._formControl.required = this._required;
    }
}
BbSelect.decorators = [
    { type: Directive, args: [{
                selector: 'select[bbInput]',
                host: {
                    '[disabled]': 'disabled',
                    '(focus)': 'setFocus(true)',
                    '(blur)': 'setFocus(false)'
                }
            },] }
];
/** @nocollapse */
BbSelect.ctorParameters = () => [
    { type: ElementRef },
    { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
    { type: BbFormControl, decorators: [{ type: Optional }, { type: Host }] }
];
BbSelect.propDecorators = {
    id: [{ type: HostBinding, args: ['attr.id',] }],
    disabled: [{ type: Input }],
    required: [{ type: Input }]
};
if (false) {
    /**
     * @type {?}
     * @protected
     */
    BbSelect.prototype.hasArrow;
    /**
     * @type {?}
     * @private
     */
    BbSelect.prototype._subscription;
    /**
     * @type {?}
     * @private
     */
    BbSelect.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    BbSelect.prototype._required;
    /**
     * @type {?}
     * @protected
     */
    BbSelect.prototype._elementRef;
    /**
     * @type {?}
     * @protected
     */
    BbSelect.prototype._ngControl;
    /**
     * @type {?}
     * @protected
     */
    BbSelect.prototype._formControl;
}
class BbInput extends BbSelect {
    /**
     * @param {?} _elementRef
     * @param {?} _ngControl
     * @param {?} _formControl
     */
    constructor(_elementRef, _ngControl, _formControl) {
        super(_elementRef, _ngControl, _formControl);
        this._elementRef = _elementRef;
        this._ngControl = _ngControl;
        this._formControl = _formControl;
        this.hasArrow = false;
        this._readonly = false;
    }
    /**
     * @return {?}
     */
    get readonly() {
        return this._readonly;
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    set readonly(newValue) {
        this._readonly = coerceBooleanProperty(newValue);
        if (!this._formControl) {
            return;
        }
        this._formControl.readonly = this._readonly;
    }
}
BbInput.decorators = [
    { type: Directive, args: [{
                selector: 'input[bbInput], textarea[bbInput]',
                host: {
                    '[disabled]': 'disabled',
                    '[readonly]': 'readonly',
                    '(focus)': 'setFocus(true)',
                    '(blur)': 'setFocus(false)'
                }
            },] }
];
/** @nocollapse */
BbInput.ctorParameters = () => [
    { type: ElementRef },
    { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
    { type: BbFormControl, decorators: [{ type: Optional }, { type: Host }] }
];
BbInput.propDecorators = {
    readonly: [{ type: Input }]
};
if (false) {
    /**
     * @type {?}
     * @protected
     */
    BbInput.prototype.hasArrow;
    /**
     * @type {?}
     * @private
     */
    BbInput.prototype._readonly;
    /**
     * @type {?}
     * @protected
     */
    BbInput.prototype._elementRef;
    /**
     * @type {?}
     * @protected
     */
    BbInput.prototype._ngControl;
    /**
     * @type {?}
     * @protected
     */
    BbInput.prototype._formControl;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/form-group/form-group.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFormGroupBase {
}
/** @type {?} */
const BbFormGroupMixinBase = mixinGrouped(BbFormGroupBase);
class BbFormGroup extends BbFormGroupMixinBase {
}
BbFormGroup.decorators = [
    { type: Component, args: [{
                selector: 'bb-form-group',
                template: "<ng-content></ng-content>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: {
                    'class': 'bb-form-group',
                    '[class.grouped]': 'grouped'
                },
                inputs: ['grouped'],
                preserveWhitespaces: false,
                styles: [".bb-form-group{width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:-10px}.bb-form-group>*{margin-top:10px}.bb-form-group>:not(:first-child){margin-left:10px}.bb-form-group.start{-ms-flex-pack:start;justify-content:flex-start}.bb-form-group.end{-ms-flex-pack:end;justify-content:flex-end}.bb-form-group.vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:normal;justify-content:normal}.bb-form-group.vertical>*{margin-left:0}.bb-form-group.vertical.start{-ms-flex-align:start;align-items:flex-start}.bb-form-group.vertical.end{-ms-flex-align:end;align-items:flex-end}.bb-form-group.grouped{margin-bottom:20px}"]
            }] }
];

/**
 * @fileoverview added by tsickle
 * Generated from: lib/form-error/form-error.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFormError {
    /**
     * @param {?} _form
     * @param {?} _control
     * @param {?} _errors
     */
    constructor(_form, _control, _errors) {
        this._form = _form;
        this._control = _control;
        this._errors = _errors;
        // Outputs.
        this.errorChange = new EventEmitter();
    }
    // Inputs.
    /**
     * @param {?} value
     * @return {?}
     */
    set control(value) {
        this._ngControl = value;
    }
    /**
     * @return {?}
     */
    get control() {
        return this._ngControl;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        // Set the control if it was not set before.
        if (!this.control) {
            this.control = this._control;
        }
        // Listen for the submit changes
        /** @type {?} */
        const submitStatus$ = this.submitStatusChanges();
        // An observable that emits error changes.
        /** @type {?} */
        const errorChanges$ = this.valueChanges().pipe(map((/**
         * @return {?}
         */
        () => this.getError(this.control.errors))), distinctUntilChanged(), map((/**
         * @param {?} error
         * @return {?}
         */
        error => typeof error === 'string' ? { token: error } : error)));
        // Whenever the user submitted the form we want to
        // listen for any error changes.
        this.error$ = submitStatus$.pipe(switchMap((/**
         * @param {?} status
         * @return {?}
         */
        status => {
            if (!status) {
                return of(null);
            }
            return errorChanges$;
        })), tap((/**
         * @param {?} value
         * @return {?}
         */
        value => this.errorChange.emit(value))));
    }
    /**
     * @private
     * @param {?=} errors
     * @return {?}
     */
    getError(errors) {
        // Validate the errors exist.
        if (!errors) {
            return null;
        }
        // Get the first error in the errors.
        const [errorName] = Object.keys(errors);
        /** @type {?} */
        const error = errors[errorName];
        // Validate the error exists.
        if (!error) {
            return null;
        }
        // Map the arrays into a object so we can
        // access the functions by a key-lookup.
        /** @type {?} */
        const errorFunctions = this._errors.reduce((/**
         * @param {?} previous
         * @param {?} current
         * @return {?}
         */
        (previous, current) => (Object.assign({}, previous, current))), {});
        // Get the error function.
        /** @type {?} */
        const errorFunction = errorFunctions[errorName] || errorFunctions['unknown'];
        // Validate the error function exists.
        if (!errorFunction) {
            return null;
        }
        // Return the parsed error.
        return errorFunction(error);
    }
    /**
     * @private
     * @return {?}
     */
    submitStatusChanges() {
        if (!this._form) {
            return of(true);
        }
        return this._form.submitStatus$;
    }
    /**
     * @private
     * @return {?}
     */
    valueChanges() {
        if (!this.control) {
            return EMPTY;
        }
        return this.control.valueChanges.pipe(startWith((/** @type {?} */ (this.control.value))), delay(0));
    }
}
BbFormError.decorators = [
    { type: Component, args: [{
                selector: 'bb-form-error',
                template: "<ng-container *ngIf=\"error$ | async as error\">\r\n    <p *ngIf=\"error?.token | bbLocalize:{optional: true, data: error?.data} as message\"\r\n       class=\"bb-form-error-message\">\r\n        {{ message }}\r\n    </p>\r\n</ng-container>",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: {
                    'class': 'bb-form-error'
                },
                preserveWhitespaces: false,
                styles: [".bb-form-error{display:block}.bb-form-error-message{color:#c23934;display:block;font-size:13px;margin-top:4px}"]
            }] }
];
/** @nocollapse */
BbFormError.ctorParameters = () => [
    { type: BbFormSubmit, decorators: [{ type: Optional }] },
    { type: NgControl, decorators: [{ type: Optional }] },
    { type: Array, decorators: [{ type: Optional }, { type: Inject, args: [ELEMENTS_ERRORS,] }] }
];
BbFormError.propDecorators = {
    control: [{ type: Input }],
    errorChange: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    BbFormError.prototype.errorChange;
    /** @type {?} */
    BbFormError.prototype.error$;
    /**
     * @type {?}
     * @private
     */
    BbFormError.prototype._ngControl;
    /**
     * @type {?}
     * @private
     */
    BbFormError.prototype._form;
    /**
     * @type {?}
     * @private
     */
    BbFormError.prototype._control;
    /**
     * @type {?}
     * @private
     */
    BbFormError.prototype._errors;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/focus-trap.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFocusTrap {
    /**
     * @param {?} _platform
     * @param {?} _elementRef
     */
    constructor(_platform, _elementRef) {
        this._platform = _platform;
        this._elementRef = _elementRef;
        this._focusableElements = [
            'a[href]',
            'area[href]',
            'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
            'select:not([disabled]):not([aria-hidden])',
            'textarea:not([disabled]):not([aria-hidden])',
            'button:not([disabled]):not([aria-hidden])',
            'iframe',
            'object',
            'embed',
            '[contenteditable]',
            '[tabindex]:not([tabindex^="-"])'
        ];
        this.focus = (/**
         * @param {?} element
         * @return {?}
         */
        (element) => {
            return element && element.focus && element.focus();
        });
        this.isTabEvent = (/**
         * @param {?} event
         * @return {?}
         */
        (event) => {
            return event.key === 'Tab' || event.keyCode === 9;
        });
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onKeydown(event) {
        // Validate it is a tab event.
        if (!this.isTabEvent(event)) {
            return;
        }
        // Trap the focus inside the element.
        return this.trapFocus(event);
    }
    /**
     * @param {?} event
     * @return {?}
     */
    trapFocus(event) {
        // Validate that the DOM is available.
        if (!this._platform.isBrowser) {
            return;
        }
        // Get all focusable nodes.
        /** @type {?} */
        const focusableNodes = this.getFocusableNodes();
        // Focus the first available element if the focus
        // is not in the modal.
        if (!this.element.contains(document.activeElement)) {
            return this.focus(focusableNodes[0]);
        }
        /** @type {?} */
        const focusedItemIndex = focusableNodes.indexOf(document.activeElement);
        if (event.shiftKey && focusedItemIndex === 0) {
            this.focus(focusableNodes[focusableNodes.length - 1]);
            return event.preventDefault();
        }
        if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {
            this.focus(focusableNodes[0]);
            return event.preventDefault();
        }
    }
    /**
     * @private
     * @return {?}
     */
    get element() {
        return this._elementRef.nativeElement;
    }
    /**
     * @private
     * @return {?}
     */
    getFocusableNodes() {
        /** @type {?} */
        const nodes = this.element.querySelectorAll(this._focusableElements);
        return Array(...nodes);
    }
}
BbFocusTrap.decorators = [
    { type: Directive, args: [{
                selector: '[bbFocusTrap]'
            },] }
];
/** @nocollapse */
BbFocusTrap.ctorParameters = () => [
    { type: Platform },
    { type: ElementRef }
];
BbFocusTrap.propDecorators = {
    onKeydown: [{ type: HostListener, args: ['keydown', ['$event'],] }]
};
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbFocusTrap.prototype._focusableElements;
    /**
     * @type {?}
     * @private
     */
    BbFocusTrap.prototype.focus;
    /**
     * @type {?}
     * @private
     */
    BbFocusTrap.prototype.isTabEvent;
    /**
     * @type {?}
     * @private
     */
    BbFocusTrap.prototype._platform;
    /**
     * @type {?}
     * @private
     */
    BbFocusTrap.prototype._elementRef;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/button/button.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbButtonBase {
    /**
     * @param {?} _elementRef
     */
    constructor(_elementRef) {
        this._elementRef = _elementRef;
    }
}
if (false) {
    /** @type {?} */
    BbButtonBase.prototype._elementRef;
}
/** @type {?} */
const BbButtonMixinBase = mixinDisabled(mixinLoad(BbButtonBase));
class BbButton extends BbButtonMixinBase {
    /**
     * @param {?} _elementRef
     */
    constructor(_elementRef) {
        super(_elementRef);
    }
    /**
     * @return {?}
     */
    get nativeElement() {
        return this._elementRef.nativeElement;
    }
    /**
     * @return {?}
     */
    focus() {
        this.nativeElement && this.nativeElement.focus();
    }
}
BbButton.decorators = [
    { type: Component, args: [{
                selector: 'button[bb-button]',
                template: "<bb-spinner [class.visible]=\"loading\"\r\n            class=\"bb-button-spinner small\">\r\n</bb-spinner>\r\n\r\n<ng-content></ng-content>\r\n",
                exportAs: 'bbButton',
                host: {
                    'class': 'bb-button',
                    '[class.loading]': 'loading',
                    '[attr.disabled]': 'disabled || loading || null'
                },
                inputs: ['disabled', 'loading'],
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                styles: [".bb-button{height:38px;padding:0 8px;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;font-style:normal;border-radius:4px;text-align:center;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-pack:center;justify-content:center;background-color:#fff;color:#2d3c4d!important;border:1px solid #d4d8e1;transition-duration:.2s;box-shadow:0 6px 6px -6px rgba(0,0,0,.1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:padding-left,background-color,box-shadow}.bb-button:hover{background-color:#fcfcfb}.bb-button:active,.bb-button:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(220,224,233,.5)}.bb-button.full{width:100%}.bb-button.full.loading{padding-left:42px}.bb-button.primary{border-color:#2f2b85;color:#fff!important;background-color:#5b53ff}.bb-button.primary:hover{background-color:#564ee6}.bb-button.primary:active,.bb-button.primary:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(91,83,255,.5)}.bb-button.destructive{border-color:#8f2020;color:#fff!important;background-color:#d32f2f}.bb-button.destructive:hover{background-color:#c32929}.bb-button.destructive:active,.bb-button.destructive:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(211,47,47,.5)}.bb-button.loading,.bb-button.loading:active,.bb-button.loading:focus,.bb-button.loading:hover,.bb-button:disabled,.bb-button:disabled:active,.bb-button:disabled:focus,.bb-button:disabled:hover,.bb-button[disabled],.bb-button[disabled]:active,.bb-button[disabled]:focus,.bb-button[disabled]:hover{opacity:.4;cursor:default;box-shadow:none}.bb-button-spinner{width:0;opacity:0;overflow:hidden;visibility:hidden;padding:0!important;transition:width .2s cubic-bezier(0,0,.2,1),opacity .1s cubic-bezier(0,0,.2,1)}.bb-button-spinner.visible{opacity:1;width:20px;margin-right:8px;visibility:visible}.bb-button.loading.full>.bb-button-spinner{left:8px;margin-right:0;position:absolute}"]
            }] }
];
/** @nocollapse */
BbButton.ctorParameters = () => [
    { type: ElementRef }
];
class BbAnchor extends BbButton {
    /**
     * @param {?} _elementRef
     */
    constructor(_elementRef) {
        super(_elementRef);
    }
    /**
     * @param {?} event
     * @return {?}
     */
    stopDisabledEvents(event) {
        // If the button is not disabled (and not loading) let all events pass.
        if (!this.disabled && !this.loading) {
            return;
        }
        // If the button is disabled and/or loading stop
        // the event from bubbling up.
        event.preventDefault();
        event.stopImmediatePropagation();
    }
}
BbAnchor.decorators = [
    { type: Component, args: [{
                selector: 'a[bb-button]',
                template: "<bb-spinner [class.visible]=\"loading\"\r\n            class=\"bb-button-spinner small\">\r\n</bb-spinner>\r\n\r\n<ng-content></ng-content>\r\n",
                exportAs: 'bbButton, bbAnchor',
                host: {
                    'class': 'bb-button',
                    '[attr.tabindex]': '(disabled || loading) ? -1 : (tabIndex || 0)',
                    '[attr.disabled]': 'disabled || loading || null',
                    '[attr.aria-disabled]': '(disabled || loading).toString()',
                    '(click)': 'stopDisabledEvents($event)'
                },
                inputs: ['disabled', 'loading'],
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                styles: [".bb-button{height:38px;padding:0 8px;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;font-style:normal;border-radius:4px;text-align:center;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;text-decoration:none;-ms-flex-pack:center;justify-content:center;background-color:#fff;color:#2d3c4d!important;border:1px solid #d4d8e1;transition-duration:.2s;box-shadow:0 6px 6px -6px rgba(0,0,0,.1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:padding-left,background-color,box-shadow}.bb-button:hover{background-color:#fcfcfb}.bb-button:active,.bb-button:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(220,224,233,.5)}.bb-button.full{width:100%}.bb-button.full.loading{padding-left:42px}.bb-button.primary{border-color:#2f2b85;color:#fff!important;background-color:#5b53ff}.bb-button.primary:hover{background-color:#564ee6}.bb-button.primary:active,.bb-button.primary:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(91,83,255,.5)}.bb-button.destructive{border-color:#8f2020;color:#fff!important;background-color:#d32f2f}.bb-button.destructive:hover{background-color:#c32929}.bb-button.destructive:active,.bb-button.destructive:focus{box-shadow:0 6px 6px -6px rgba(0,0,0,.1),0 0 0 3px rgba(211,47,47,.5)}.bb-button.loading,.bb-button.loading:active,.bb-button.loading:focus,.bb-button.loading:hover,.bb-button:disabled,.bb-button:disabled:active,.bb-button:disabled:focus,.bb-button:disabled:hover,.bb-button[disabled],.bb-button[disabled]:active,.bb-button[disabled]:focus,.bb-button[disabled]:hover{opacity:.4;cursor:default;box-shadow:none}.bb-button-spinner{width:0;opacity:0;overflow:hidden;visibility:hidden;padding:0!important;transition:width .2s cubic-bezier(0,0,.2,1),opacity .1s cubic-bezier(0,0,.2,1)}.bb-button-spinner.visible{opacity:1;width:20px;margin-right:8px;visibility:visible}.bb-button.loading.full>.bb-button-spinner{left:8px;margin-right:0;position:absolute}"]
            }] }
];
/** @nocollapse */
BbAnchor.ctorParameters = () => [
    { type: ElementRef }
];
BbAnchor.propDecorators = {
    tabIndex: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    BbAnchor.prototype.tabIndex;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/template.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbTemplate {
    /**
     * @param {?} _templateRef
     * @param {?} _viewContainerRef
     */
    constructor(_templateRef, _viewContainerRef) {
        this._templateRef = _templateRef;
        this._viewContainerRef = _viewContainerRef;
    }
    /**
     * @param {?} content
     * @return {?}
     */
    set bbTemplate(content) {
        // Get the template.
        /** @type {?} */
        const template = content instanceof TemplateRef
            ? content
            : this._templateRef;
        // Clear the view container ref and create the view.
        this._viewContainerRef.clear();
        this._viewContainerRef.createEmbeddedView(template);
    }
}
BbTemplate.decorators = [
    { type: Directive, args: [{
                selector: '[bbTemplate]'
            },] }
];
/** @nocollapse */
BbTemplate.ctorParameters = () => [
    { type: TemplateRef },
    { type: ViewContainerRef }
];
BbTemplate.propDecorators = {
    bbTemplate: [{ type: Input }]
};
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbTemplate.prototype._templateRef;
    /**
     * @type {?}
     * @private
     */
    BbTemplate.prototype._viewContainerRef;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/autosize.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbAutosize {
    /**
     * @param {?} _renderer
     * @param {?} _elementRef
     */
    constructor(_renderer, _elementRef) {
        this._renderer = _renderer;
        this._elementRef = _elementRef;
        // Min/max heights for the textarea.
        this.minHeight = null;
        this.maxHeight = null;
    }
    /**
     * @return {?}
     */
    get element() {
        return this._elementRef.nativeElement;
    }
    /**
     * @return {?}
     */
    ngAfterViewInit() {
        // Update the styles after the DOM has loaded.
        this.updateStyles();
    }
    /**
     * @return {?}
     */
    onWindowResize() {
        // Update the styles when the window is resized.
        this.updateStyles();
    }
    /**
     * @return {?}
     */
    onInputReceived() {
        // Update the styles after the textarea received input.
        this.updateStyles();
    }
    /**
     * @private
     * @return {?}
     */
    updateStyles() {
        // If the element does not exist exit.
        if (!this.element) {
            return;
        }
        // If the scroll height is the same height as the element, then exit.
        if (this.element.style.height === this.element.scrollHeight + 'px') {
            return;
        }
        // Set the style of the element to 'auto' to reset the element.
        this._renderer.setStyle(this.element, 'height', 'auto');
        // Set the style of the element to the scroll height to make
        // the element fit all the text.
        this._renderer.setStyle(this.element, 'height', this.element.scrollHeight + 'px');
    }
}
BbAutosize.decorators = [
    { type: Directive, args: [{
                selector: 'textarea[bbAutosize]'
            },] }
];
/** @nocollapse */
BbAutosize.ctorParameters = () => [
    { type: Renderer2 },
    { type: ElementRef }
];
BbAutosize.propDecorators = {
    minHeight: [{ type: Input }, { type: HostBinding, args: ['style.min-height',] }],
    maxHeight: [{ type: Input }, { type: HostBinding, args: ['style.max-height',] }],
    onWindowResize: [{ type: HostListener, args: ['window:resize',] }],
    onInputReceived: [{ type: HostListener, args: ['input',] }]
};
if (false) {
    /** @type {?} */
    BbAutosize.prototype.minHeight;
    /** @type {?} */
    BbAutosize.prototype.maxHeight;
    /**
     * @type {?}
     * @private
     */
    BbAutosize.prototype._renderer;
    /**
     * @type {?}
     * @private
     */
    BbAutosize.prototype._elementRef;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/checkbox/checkbox.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
let nextUniqueId$2 = 0;
class BbCheckboxBase {
}
/** @type {?} */
const BbCheckboxMixinBase = mixinDisabled(mixinGrouped(BbCheckboxBase));
class BbCheckbox extends BbCheckboxMixinBase {
    /**
     * @param {?} _changeDetection
     */
    constructor(_changeDetection) {
        super();
        this._changeDetection = _changeDetection;
        // Data.
        this.labelId = `bb-checkbox-${nextUniqueId$2++}`;
        this._checked = false;
        // Methods.
        this.onChange = (/**
         * @return {?}
         */
        () => {
        });
        this.onTouched = (/**
         * @return {?}
         */
        () => {
        });
    }
    /**
     * @return {?}
     */
    get checked() {
        return this._checked;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    set checked(value) {
        this._checked = coerceBooleanProperty(value);
        this._changeDetection.markForCheck();
    }
    /**
     * @param {?} fn
     * @return {?}
     */
    registerOnChange(fn) {
        this.onChange = fn;
    }
    /**
     * @param {?} fn
     * @return {?}
     */
    registerOnTouched(fn) {
        this.onTouched = fn;
    }
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
        this._changeDetection.markForCheck();
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    writeValue(newValue) {
        this.checked = newValue;
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onInteractionEvent(event) {
        // Stop the propagation to prevent it from bubbling up.
        event.stopPropagation();
    }
    /**
     * @param {?} event
     * @return {?}
     */
    onInputClick(event) {
        // Stop the propagation to prevent it from bubbling up.
        event.stopPropagation();
        // Toggle the value.
        this.checked = !this.checked;
        // Emit the change event.
        this.onChange && this.onChange(this.checked);
    }
}
BbCheckbox.decorators = [
    { type: Component, args: [{
                selector: 'bb-checkbox',
                template: "<input [id]=\"labelId\"\r\n       [checked]=\"checked\"\r\n       [disabled]=\"disabled\"\r\n       (change)=\"onInteractionEvent($event)\"\r\n       (click)=\"onInputClick($event)\"\r\n       class=\"bb-checkbox-input\"\r\n       tabindex=\"-1\"\r\n       type=\"checkbox\">\r\n\r\n<label [for]=\"labelId\"\r\n       [attr.tabindex]=\"disabled ? -1 : (tabIndex || 0)\"\r\n       (keyup.space)=\"onInputClick($event)\"\r\n       class=\"bb-checkbox-label\">\r\n    <span>\r\n        <svg width=\"12px\"\r\n             height=\"10px\"\r\n             viewbox=\"0 0 12 10\">\r\n            <polyline points=\"1.5 6 4.5 9 10.5 1\"></polyline>\r\n        </svg>\r\n    </span>\r\n    <span>\r\n        <ng-content></ng-content>\r\n    </span>\r\n</label>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                providers: [
                    { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((/**
                         * @return {?}
                         */
                        () => BbCheckbox)), multi: true }
                ],
                host: {
                    'class': 'bb-checkbox',
                    '[class.grouped]': 'grouped'
                },
                inputs: ['grouped', 'disabled'],
                preserveWhitespaces: false,
                styles: [".bb-checkbox{display:block}.bb-checkbox+.bb-checkbox{margin-top:5px}.bb-checkbox.grouped{margin-bottom:20px}.bb-checkbox-input{display:none}.bb-checkbox-label{margin:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-checkbox-label>span{display:inline-block;vertical-align:middle;transform:translate3d(0,0,0)}.bb-checkbox-label>span:first-child{width:18px;height:18px;position:relative;border-radius:3px;vertical-align:middle;border:1px solid #bdc4c9;transition:.2s}.bb-checkbox-label>span:last-child{padding-left:8px}.bb-checkbox-label>span:first-child>svg{top:3px;left:2px;fill:none;stroke:#fff;stroke-width:2;position:absolute;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:.3s;transform:translate3d(0,0,0)}.bb-checkbox-input:not(:disabled):not(:checked)+.bb-checkbox-label:focus>span:first-child{box-shadow:0 0 0 3px rgba(222,205,205,.5)}.bb-checkbox-input:not(:disabled):checked+.bb-checkbox-label:focus>span:first-child{box-shadow:0 0 0 3px rgba(91,83,255,.5)}.bb-checkbox-input:checked+.bb-checkbox-label>span:first-child{border-color:#5b53ff;background-color:#5b53ff}.bb-checkbox-input:checked+.bb-checkbox-label>span:first-child>svg{stroke-dashoffset:0}.bb-checkbox-input:disabled+.bb-checkbox-label{cursor:default;pointer-events:none}.bb-checkbox-input:disabled:checked+.bb-checkbox-label>span:first-child{border-color:rgba(204,204,204,.64);background-color:rgba(204,204,204,.64)}"]
            }] }
];
/** @nocollapse */
BbCheckbox.ctorParameters = () => [
    { type: ChangeDetectorRef }
];
BbCheckbox.propDecorators = {
    tabIndex: [{ type: Input }],
    checked: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    BbCheckbox.prototype.labelId;
    /** @type {?} */
    BbCheckbox.prototype.tabIndex;
    /**
     * @type {?}
     * @private
     */
    BbCheckbox.prototype._checked;
    /** @type {?} */
    BbCheckbox.prototype.onChange;
    /** @type {?} */
    BbCheckbox.prototype.onTouched;
    /**
     * @type {?}
     * @private
     */
    BbCheckbox.prototype._changeDetection;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/spinner/spinner.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbSpinnerBase {
}
/** @type {?} */
const BbSpinnerMixinBase = mixinDisabled(BbSpinnerBase);
class BbSpinner extends BbSpinnerMixinBase {
    constructor() {
        super(...arguments);
        // Inputs.
        this.color = '#303f9f';
        this.alt = 'Loading...';
    }
}
BbSpinner.decorators = [
    { type: Component, args: [{
                selector: 'bb-spinner',
                template: "<!--\r\n    The spinner element.\r\n\r\n    This element contains a circle with a 25% bar that spins\r\n    indefinitely. The border color can be set via the \"color\"\r\n    property.\r\n-->\r\n<div class=\"bb-spinner-container\">\r\n    <div [style.border-left-color]=\"color\"\r\n         [class.disabled]=\"disabled\"\r\n         class=\"bb-spinner-loader\"\r\n         aria-live=\"assertive\"\r\n         role=\"alert\">\r\n        {{ alt }}\r\n    </div>\r\n    <ng-content select=\"img\"></ng-content>\r\n</div>\r\n\r\n<!--\r\n    The content of the spinner.\r\n\r\n    This element contains the content of the spinner. The user\r\n    can set the content inside the tag.\r\n-->\r\n<span class=\"bb-spinner-content\">\r\n    <ng-content></ng-content>\r\n</span>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: { 'class': 'bb-spinner' },
                inputs: ['color', 'alt', 'disabled'],
                preserveWhitespaces: false,
                styles: [".bb-spinner{color:#565656;padding:20px 0;text-align:center;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.bb-spinner.block{display:-ms-flexbox;display:flex}.bb-spinner.inverse .bb-spinner-loader{border-color:rgba(255,255,255,.15)}.bb-spinner.inverse .bb-spinner-content{color:rgba(255,255,255,.5)}.bb-spinner.small .bb-spinner-loader,.bb-spinner.small .bb-spinner-loader:after{width:20px;height:20px;min-width:20px;min-height:20px}.bb-spinner.small .bb-spinner-loader{border-width:2px}.bb-spinner.small .bb-spinner-content{font-size:12px}.bb-spinner.medium .bb-spinner-loader,.bb-spinner.medium .bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px}.bb-spinner.medium .bb-spinner-loader{border-width:4px}.bb-spinner.medium .bb-spinner-content{font-size:16px}.bb-spinner.large .bb-spinner-loader,.bb-spinner.large .bb-spinner-loader:after{width:100px;height:100px;min-width:100px;min-height:100px}.bb-spinner.large .bb-spinner-loader{border-width:6px}.bb-spinner.large .bb-spinner-content{font-size:20px}.bb-spinner.horizontal{text-align:left;-ms-flex-direction:row;flex-direction:row}.bb-spinner.horizontal .bb-spinner-content:not(:empty){margin-left:10px;margin-top:0}.bb-spinner.vertical{text-align:center;-ms-flex-direction:column;flex-direction:column}.bb-spinner.vertical .bb-spinner-content:not(:empty){margin-left:0;margin-top:10px}.bb-spinner-container{display:-ms-flexbox;display:flex;position:relative}.bb-spinner-container>img{top:20%;left:20%;width:60%;height:60%;position:absolute}.bb-spinner-loader{margin:0;padding:0;overflow:hidden;text-indent:100%;position:relative;display:inline-block;vertical-align:middle;border:4px solid #f2f4f6;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.bb-spinner-loader,.bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px;border-radius:50%}.bb-spinner-loader.disabled{cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-animation-play-state:paused;animation-play-state:paused}.bb-spinner-content:not(:empty){font-size:16px;margin-top:10px;font-weight:500}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"]
            }] }
];
BbSpinner.propDecorators = {
    color: [{ type: Input }],
    alt: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    BbSpinner.prototype.color;
    /** @type {?} */
    BbSpinner.prototype.alt;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/directives/focus.directive.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFocus {
    /**
     * @param {?} _zone
     * @param {?} _platform
     * @param {?} _elementRef
     */
    constructor(_zone, _platform, _elementRef) {
        this._zone = _zone;
        this._platform = _platform;
        this._elementRef = _elementRef;
    }
    /**
     * @private
     * @return {?}
     */
    get nativeElement() {
        return this._elementRef.nativeElement;
    }
    /**
     * @return {?}
     */
    ngAfterViewInit() {
        // Run the method outside the Angular zone.
        this._zone.runOutsideAngular((/**
         * @return {?}
         */
        () => this.focus()));
    }
    /**
     * @private
     * @return {?}
     */
    focus() {
        // Check if set timeout exists and the user is
        // using the site on desktop devices.
        if (!this._platform.isDesktop || !setTimeout) {
            return;
        }
        // Check if the element and the focus method exist, if so focus the element.
        if (!this.nativeElement || !this.nativeElement.focus) {
            return;
        }
        // Execute the focus method in a timeout.
        setTimeout((/**
         * @return {?}
         */
        () => this.nativeElement.focus()), 0);
    }
}
BbFocus.decorators = [
    { type: Directive, args: [{
                selector: '[bbFocus]'
            },] }
];
/** @nocollapse */
BbFocus.ctorParameters = () => [
    { type: NgZone },
    { type: Platform },
    { type: ElementRef }
];
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbFocus.prototype._zone;
    /**
     * @type {?}
     * @private
     */
    BbFocus.prototype._platform;
    /**
     * @type {?}
     * @private
     */
    BbFocus.prototype._elementRef;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/pipes/file-image.pipe.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFileImage {
    /**
     * @param {?} _image
     * @param {?} _sanitizer
     */
    constructor(_image, _sanitizer) {
        this._image = _image;
        this._sanitizer = _sanitizer;
    }
    /**
     * @param {?} file
     * @return {?}
     */
    transform(file) {
        return __awaiter(this, void 0, void 0, function* () {
            // If the file is not a file return.
            if (!(file instanceof File)) {
                return null;
            }
            return this._image.fileToImage(file, [
                'image/png',
                'image/jpeg',
                'image/gif',
                'image/svg+xml'
            ]).then((/**
             * @param {?} image
             * @return {?}
             */
            image => {
                if (!image) {
                    return null;
                }
                return {
                    background: this._sanitizer.bypassSecurityTrustStyle(`url(${image.src})`),
                    aspectRatio: image.height / image.width
                };
            })).catch((/**
             * @return {?}
             */
            () => {
                return null;
            }));
        });
    }
}
BbFileImage.decorators = [
    { type: Pipe, args: [{
                name: 'bbFileImage'
            },] }
];
/** @nocollapse */
BbFileImage.ctorParameters = () => [
    { type: ImageConverter },
    { type: DomSanitizer }
];
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbFileImage.prototype._image;
    /**
     * @type {?}
     * @private
     */
    BbFileImage.prototype._sanitizer;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/pipes/file-size.pipe.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbFileSize {
    constructor() {
        this.format = (/**
         * @param {?} value
         * @param {?=} decimals
         * @return {?}
         */
        (value, decimals = 2) => {
            if (value === 0) {
                return '0 Bytes';
            }
            /** @type {?} */
            const k = 1024;
            /** @type {?} */
            const dm = decimals < 0 ? 0 : decimals;
            /** @type {?} */
            const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
            /** @type {?} */
            const index = Math.floor(Math.log(value) / Math.log(k));
            return parseFloat((value / Math.pow(k, index)).toFixed(dm)) + ' ' + sizes[index];
        });
    }
    /**
     * @param {?} value
     * @return {?}
     */
    transform(value) {
        return this.format(value);
    }
}
BbFileSize.decorators = [
    { type: Pipe, args: [{
                name: 'bbFileSize'
            },] }
];
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbFileSize.prototype.format;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/icon/icon.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbIcon {
    /**
     * @param {?} _registry
     */
    constructor(_registry) {
        this._registry = _registry;
        // Data.
        this._src = null;
        // State.
        this.state$ = new BehaviorSubject(null);
        this.alt = null;
        this.size = 24;
        this._ariaHidden = true;
        this.warn = (/**
         * @param {?} content
         * @return {?}
         */
        (content) => {
            return console && console.warn && console.warn(content);
        });
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    set src(newValue) {
        this.state$.next(this.convert(newValue));
        this._src = newValue;
    }
    /**
     * @return {?}
     */
    get src() {
        return this._src;
    }
    /**
     * @param {?} newValue
     * @return {?}
     */
    set ariaHidden(newValue) {
        this._ariaHidden = coerceBooleanProperty(newValue);
    }
    /**
     * @return {?}
     */
    get ariaHidden() {
        return this._ariaHidden;
    }
    /**
     * @private
     * @param {?} src
     * @return {?}
     */
    convert(src) {
        const [namespace, value] = (src || '').split(':');
        /** @type {?} */
        const onError = (/**
         * @return {?}
         */
        () => {
            this.warn(`ElementsModule: The icon with src "${src}" could not be rendered correctly; Did you put a correct src attribute?`);
            return { type: 'unknown' };
        });
        if (!namespace || !value || !this._registry) {
            return onError();
        }
        // Try to find a image icon.
        /** @type {?} */
        const imageIcon = this.findImageIcon(namespace, value);
        if (imageIcon) {
            return imageIcon;
        }
        // Try to find a font icon.
        /** @type {?} */
        const fontIcon = this.findFontIcon(namespace, value);
        if (fontIcon) {
            return fontIcon;
        }
        // Return the on error function.
        return onError();
    }
    /**
     * @private
     * @param {?} namespace
     * @param {?} value
     * @return {?}
     */
    findImageIcon(namespace, value) {
        /** @type {?} */
        const data = this._registry.find((/**
         * @param {?} item
         * @return {?}
         */
        item => item['namespace'] === namespace && item['name'] === value));
        if (!data) {
            return null;
        }
        return { type: data['type'], src: data['src'] };
    }
    /**
     * @private
     * @param {?} namespace
     * @param {?} content
     * @return {?}
     */
    findFontIcon(namespace, content) {
        /** @type {?} */
        const data = this._registry.find((/**
         * @param {?} item
         * @return {?}
         */
        item => item['namespace'] === namespace));
        if (!data) {
            return null;
        }
        /** @type {?} */
        const isInline = data['inline'] || false;
        if (isInline) {
            return { type: data['type'], className: `${data['className']}${content}` };
        }
        return { type: data['type'], className: data['className'], content };
    }
}
BbIcon.decorators = [
    { type: Component, args: [{
                selector: 'bb-icon',
                template: "<ng-container *ngIf=\"state$ | async as data\"\r\n              [ngSwitch]=\"data?.type\">\r\n    <i *ngSwitchCase=\"'font'\"\r\n       [class]=\"data?.className\">\r\n        {{ data?.content }}\r\n    </i>\r\n    <img *ngSwitchCase=\"'image'\"\r\n         [src]=\"data?.src\"\r\n         [alt]=\"alt\">\r\n    <svg *ngSwitchCase=\"'unknown'\"\r\n         viewBox=\"0 0 1 1\">\r\n        <rect x=\"0\" y=\"0\" width=\"1\" height=\"1\" fill=\"#c5c5c5\"></rect>\r\n    </svg>\r\n</ng-container>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                host: {
                    'class': 'bb-icon',
                    '[attr.aria-hidden]': 'ariaHidden',
                    '[style.width.px]': 'size',
                    '[style.height.px]': 'size',
                    '[style.min-width.px]': 'size',
                    '[style.min-height.px]': 'size'
                },
                preserveWhitespaces: false,
                styles: [".bb-icon{display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bb-icon>img,.bb-icon>svg{width:100%;height:100%;display:-ms-flexbox;display:flex}"]
            }] }
];
/** @nocollapse */
BbIcon.ctorParameters = () => [
    { type: Array, decorators: [{ type: Optional }, { type: Inject, args: [ELEMENTS_ICONS,] }] }
];
BbIcon.propDecorators = {
    alt: [{ type: Input }],
    size: [{ type: Input }],
    src: [{ type: Input }],
    ariaHidden: [{ type: Input }]
};
if (false) {
    /**
     * @type {?}
     * @private
     */
    BbIcon.prototype._src;
    /** @type {?} */
    BbIcon.prototype.state$;
    /** @type {?} */
    BbIcon.prototype.alt;
    /** @type {?} */
    BbIcon.prototype.size;
    /**
     * @type {?}
     * @private
     */
    BbIcon.prototype._ariaHidden;
    /**
     * @type {?}
     * @private
     */
    BbIcon.prototype.warn;
    /**
     * @type {?}
     * @private
     */
    BbIcon.prototype._registry;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/tag/tag.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbTag {
    constructor() {
        // Outputs.
        this.onClose = new EventEmitter();
    }
}
BbTag.decorators = [
    { type: Component, args: [{
                selector: 'bb-tag',
                template: "<ng-content></ng-content>\r\n\r\n<button *ngIf=\"onClose?.observers?.length > 0\"\r\n        (click)=\"onClose.emit()\"\r\n        type=\"button\">\r\n    Close\r\n</button>",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                preserveWhitespaces: false,
                host: { 'class': 'bb-tag' },
                styles: [".bb-tag{cursor:default;padding:0 7px;font-size:12px;list-style:none;line-height:20px;border-radius:4px;white-space:nowrap;display:inline-block;color:rgba(0,0,0,.65);border:1px solid #d9d9d9;background-color:#fafafa;font-variant:tabular-nums;font-feature-settings:\"tnum\"}.bb-tag:not(:last-child){margin-right:8px}"]
            }] }
];
BbTag.propDecorators = {
    onClose: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    BbTag.prototype.onClose;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/elements.module.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
const DECLARATIONS_EXPORTS = [
    // Directives.
    BbTemplate,
    BbFormError,
    BbFormSubmit,
    BbInput,
    BbSelect,
    BbFocus,
    BbFocusTrap,
    BbAutosize,
    BbPrefix,
    BbSuffix,
    // Pipes.
    BbFileSize,
    BbFileImage,
    // Components.
    BbButton,
    BbAnchor,
    BbSpinner,
    BbIcon,
    BbFormControl,
    BbFormGroup,
    BbCheckbox,
    BbImagePicker,
    BbDropdown,
    BbDropdownItem,
    BbTag,
    BbFilePicker
];
class ElementsModule {
    /**
     * @return {?}
     */
    static forRoot() {
        return {
            ngModule: ElementsModule,
            providers: [
                { provide: ELEMENTS_ERRORS, useFactory: getErrors, multi: true },
                ELEMENTS_MATERIAL_ICON
            ]
        };
    }
}
ElementsModule.decorators = [
    { type: NgModule, args: [{
                imports: [CommonModule, LocalizeModule],
                declarations: [...DECLARATIONS_EXPORTS],
                exports: [...DECLARATIONS_EXPORTS]
            },] }
];
const ɵ0 = { namespace: 'material', className: 'material-icons', type: 'font' };
/** @type {?} */
const ELEMENTS_MATERIAL_ICON = {
    provide: ELEMENTS_ICONS,
    useValue: ɵ0,
    multi: true
};
/**
 * @return {?}
 */
function getErrors() {
    /** @type {?} */
    const data = {
        unknown: (/**
         * @return {?}
         */
        () => 'form-control-errors.unknown'),
        required: (/**
         * @return {?}
         */
        () => 'form-control-errors.required'),
        pattern: (/**
         * @return {?}
         */
        () => 'form-control-errors.pattern'),
        email: (/**
         * @return {?}
         */
        () => 'form-control-errors.email'),
        emailTaken: (/**
         * @return {?}
         */
        () => 'form-control-errors.emailTaken'),
        passwordMatch: (/**
         * @return {?}
         */
        () => 'form-control-errors.passwordMatch'),
        fullNumber: (/**
         * @return {?}
         */
        () => 'form-control-errors.fullNumber'),
        min: (/**
         * @param {?} __0
         * @return {?}
         */
        ({ min }) => ({ token: 'form-control-errors.min', data: { min } })),
        max: (/**
         * @param {?} __0
         * @return {?}
         */
        ({ max }) => ({ token: 'form-control-errors.max', data: { max } })),
        maxFileSize: (/**
         * @param {?} __0
         * @return {?}
         */
        ({ maxSize }) => ({ token: 'form-control-errors.maxFileSize', data: { maxSize } })),
        minlength: (/**
         * @param {?} __0
         * @return {?}
         */
        ({ requiredLength, actualLength }) => ({
            token: 'form-control-errors.minlength',
            data: { requiredLength, actualLength }
        })),
        maxlength: (/**
         * @param {?} __0
         * @return {?}
         */
        ({ requiredLength, actualLength }) => ({
            token: 'form-control-errors.maxlength',
            data: { requiredLength, actualLength }
        }))
    };
    return data;
}

/**
 * @fileoverview added by tsickle
 * Generated from: public_api.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * Generated from: bravobit-bb-foundation-elements.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

export { BbAnchor, BbAutosize, BbButton, BbCheckbox, BbFileImage, BbFilePicker, BbFileSize, BbFocus, BbFocusTrap, BbFormControl, BbFormError, BbFormGroup, BbFormSubmit, BbIcon, BbInput, BbPrefix, BbSelect, BbSpinner, BbSuffix, BbTag, BbTemplate, ELEMENTS_ERRORS, ELEMENTS_ICONS, ELEMENTS_MATERIAL_ICON, ElementsModule, getErrors, BbImagePicker as ɵa, BbDropdown as ɵb, BbDropdownItem as ɵc };
//# sourceMappingURL=bravobit-bb-foundation-elements.js.map
