import{I as e}from"./p-abd7aeaa.js";class r extends e{constructor(){super(...arguments),this.checkArrayItemType=e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e}evaluate(e){if(this.isAcceptedInputType(e))return"number"==typeof e||"boolean"==typeof e?{isValid:!0,message:""}:"string"==typeof e||Array.isArray(e)?{isValid:e.length>0,message:e.length<=0?"This field is required":""}:{isValid:!1,message:"This field is required"};throw new Error(`Unexpected type of input: ${typeof e}: ${e}`)}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||Array.isArray(e)&&e.every(this.checkArrayItemType)||null==e}}export{r as R}