/*!
 * KoliBri - The accessible HTML-Standard
 */
import{w as watchValidator,q as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,s as setState}from"./prop.validators-64749272.js";import{a as isObject}from"./common-0f1f2276.js";const validateTableCallbacks=(e,o)=>{watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),o)},validateTableStatefulCallbacks=(e,o)=>{watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),o)},validateTableData=(e,o,a)=>{emptyStringByArrayHandler(o,(()=>{objectObjectHandler(o,(()=>{void 0===o&&(o=[]);try{o=parseJson(o)}catch(e){}Array.isArray(o)&&o.every((e=>"object"==typeof e&&null!==e))&&setState(e,"_data",o,a)}))}))},validateTableDataFoot=(e,o,a)=>{emptyStringByArrayHandler(o,(()=>{objectObjectHandler(o,(()=>{void 0===o&&(o=[]);try{o=parseJson(o)}catch(e){}Array.isArray(o)&&o.every((e=>"object"==typeof e&&null!==e))&&setState(e,"_dataFoot",o,a)}))}))},validateTableSelection=(e,o)=>{(e=>e&&isObject(e)&&"function"==typeof e.label&&(!e.selectedKeys||Array.isArray(e.selectedKeys)))("string"==typeof o?(()=>{try{return parseJson(o)}catch(e){return}})():o)&&setState(e,"_selection",o)};var Events;!function(e){e.onBlur="onBlur",e.onChange="onChange",e.onClick="onClick",e.onDblClick="onDblClick",e.onFocus="onFocus",e.onInput="onInput",e.onKeyDown="onKeyDown",e.onKeyPress="onKeyPress",e.onKeyUp="onKeyUp",e.onMouseDown="onMouseDown",e.onMouseMove="onMouseMove",e.onMouseOut="onMouseOut",e.onMouseOver="onMouseOver",e.onMouseUp="onMouseUp",e.onReset="onReset",e.onSelect="onSelect",e.onSort="onSort",e.onSelectionChange="onSelectionChange",e.onSubmit="onSubmit",e.onToggle="onToggle",e.onClose="onClose"}(Events||(Events={}));export{Events as E,validateTableDataFoot as a,validateTableSelection as b,validateTableStatefulCallbacks as c,validateTableCallbacks as d,validateTableData as v};