/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";const controller=require("./controller-6585b2bb.js"),icons=require("./icons-30925600.js"),prop_validators=require("./prop.validators-476ef807.js"),reuse=require("./reuse-daa2baf3.js"),beforePatchIcons=(o,t)=>{const e=o;"object"==typeof e&&null!==e&&(reuse.isString(e.right,1)&&(e.right={icon:e.right}),reuse.isString(e.left,1)&&(e.left={icon:e.left}),t.set("_icons",e))};class InputIconController extends controller.InputController{constructor(o,t,e){super(o,t,e),this.component=o}validateIcon(o){this.validateIcons(o)}validateIcons(o){prop_validators.objectObjectHandler(o,(()=>{try{o=prop_validators.parseJson(o)}catch(o){}prop_validators.watchValidator(this.component,"_icons",(o=>"object"==typeof o&&null!==o&&(reuse.isString(o.left,1)||icons.isIcon(o.left)||reuse.isString(o.right,1)||icons.isIcon(o.right))),new Set(["KoliBriHorizontalIcon"]),o,{hooks:{beforePatch:beforePatchIcons},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}exports.InputIconController=InputIconController;