/*!
 * KoliBri - The accessible HTML-Standard
 */
import { labelWithExpertSlotProp, levelProp, secondaryHeadlineProp } from "../../props";
import { BaseController } from "../base-controller";
import { headingPropsConfig } from "./api";
export class HeadingController extends BaseController {
    constructor(stateAccess) {
        super(stateAccess, headingPropsConfig);
    }
    componentWillLoad(props) {
        const { label, level, secondaryHeadline } = props;
        this.watchLabel(label);
        this.watchLevel(level);
        this.watchSecondaryHeadline(secondaryHeadline);
    }
    watchLabel(value) {
        labelWithExpertSlotProp.apply(value, (v) => {
            this.setRenderProp('label', v);
        });
    }
    watchLevel(value) {
        levelProp.apply(value, (v) => {
            this.setRenderProp('level', v);
        });
    }
    watchSecondaryHeadline(value) {
        secondaryHeadlineProp.apply(value, (v) => {
            this.setRenderProp('secondaryHeadline', v);
        });
    }
}
//# sourceMappingURL=controller.js.map
