'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const __chunk_1 = require('./chunk-91f43df3.js');
const __chunk_8 = require('./chunk-8f56dc04.js');

class RefresherContent {
    constructor(hostRef) {
        __chunk_1.registerInstance(this, hostRef);
    }
    componentWillLoad() {
        if (this.pullingIcon === undefined) {
            this.pullingIcon = __chunk_1.config.get('refreshingIcon', 'arrow-down');
        }
        if (this.refreshingSpinner === undefined) {
            const mode = __chunk_1.getIonMode(this);
            this.refreshingSpinner = __chunk_1.config.get('refreshingSpinner', __chunk_1.config.get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
        }
    }
    hostData() {
        const mode = __chunk_1.getIonMode(this);
        return {
            class: {
                [mode]: true,
            }
        };
    }
    __stencil_render() {
        return [
            __chunk_1.h("div", { class: "refresher-pulling" }, this.pullingIcon &&
                __chunk_1.h("div", { class: "refresher-pulling-icon" }, __chunk_1.h("ion-icon", { icon: this.pullingIcon, lazy: false })), this.pullingText &&
                __chunk_1.h("div", { class: "refresher-pulling-text", innerHTML: __chunk_8.sanitizeDOMString(this.pullingText) })),
            __chunk_1.h("div", { class: "refresher-refreshing" }, this.refreshingSpinner &&
                __chunk_1.h("div", { class: "refresher-refreshing-icon" }, __chunk_1.h("ion-spinner", { name: this.refreshingSpinner })), this.refreshingText &&
                __chunk_1.h("div", { class: "refresher-refreshing-text", innerHTML: __chunk_8.sanitizeDOMString(this.refreshingText) }))
        ];
    }
    render() { return __chunk_1.h(__chunk_1.Host, this.hostData(), this.__stencil_render()); }
}

exports.ion_refresher_content = RefresherContent;
