/*!
 * KoliBri - The accessible HTML-Standard
 */
import{d as watchBoolean,w as watchValidator,O as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,s as setState,G as isObject}from"./common-Dd0zJQbD.js";const validateHasSettingsMenu=(a,e)=>{watchBoolean(a,"_hasSettingsMenu",e)},validateTableCallbacks=(a,e)=>{watchValidator(a,"_on",a=>"object"==typeof a&&null!==a,new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),e)},validateTableStatefulCallbacks=(a,e)=>{watchValidator(a,"_on",a=>"object"==typeof a&&null!==a,new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),e)},validateTableData=(a,e,t)=>{emptyStringByArrayHandler(e,()=>{objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(a){}Array.isArray(e)&&e.every(a=>"object"==typeof a&&null!==a)&&setState(a,"_data",e,t)})})},validateTableDataFoot=(a,e,t)=>{emptyStringByArrayHandler(e,()=>{objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(a){}Array.isArray(e)&&e.every(a=>"object"==typeof a&&null!==a)&&setState(a,"_dataFoot",e,t)})})},validateTableSelection=(a,e)=>{(a=>a&&isObject(a)&&"function"==typeof a.label&&(!a.selectedKeys||Array.isArray(a.selectedKeys)))("string"==typeof e?(()=>{try{return parseJson(e)}catch(a){return}})():e)&&setState(a,"_selection",e)},validateTableSettings=(a,e)=>{watchValidator(a,"_tableSettings",a=>"object"==typeof a&&null!==a,new Set(["TableSettings"]),e)};export{validateTableDataFoot as a,validateHasSettingsMenu as b,validateTableSelection as c,validateTableStatefulCallbacks as d,validateTableSettings as e,validateTableCallbacks as f,validateTableData as v};