"use strict";
import {base} from './base.js'
import { util } from '../../util/util.js'
import {verify} from '../../util/verify.js'
class inputHidden extends base{
    constructor(data) {
        super(data);
        this.type='hidden';
    }
    render(parentObjID){
        let data=this.data
        if(data.kind==undefined||data.kind=='default'){
            this.renderDefault(parentObjID);
        }
        if(data.kind=='custom'){
            this.renderCustom(parentObjID);
        }
    }
    renderDefault(parentObjID){
        let that=this;
        let data=that.data
        let defaultValue=data.default_value;
        let eleName=that.data.name;
        let htmlTemplate=`
        <div id="${that.objID}"><input type="hidden" id="${that.eleID}" name="${eleName}" value="${!util.isNull(defaultValue)?defaultValue:''}"></div>`;
        document.getElementById(parentObjID).insertAdjacentHTML("beforeEnd",htmlTemplate);
    }
}
export {inputHidden}