/*!
 * KoliBri - The accessible HTML-Standard
 */
import{w as watchValidator,t as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,s as setState}from"./prop.validators-9feb1d92.js";import{b as isObject}from"./common-54bf85ba.js";const validateTableCallbacks=(e,a)=>{watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),a)},validateTableStatefulCallbacks=(e,a)=>{watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),a)},validateTableData=(e,a,o)=>{emptyStringByArrayHandler(a,(()=>{objectObjectHandler(a,(()=>{void 0===a&&(a=[]);try{a=parseJson(a)}catch(e){}Array.isArray(a)&&a.every((e=>"object"==typeof e&&null!==e))&&setState(e,"_data",a,o)}))}))},validateTableDataFoot=(e,a,o)=>{emptyStringByArrayHandler(a,(()=>{objectObjectHandler(a,(()=>{void 0===a&&(a=[]);try{a=parseJson(a)}catch(e){}Array.isArray(a)&&a.every((e=>"object"==typeof e&&null!==e))&&setState(e,"_dataFoot",a,o)}))}))},validateTableSelection=(e,a)=>{(e=>e&&isObject(e)&&"function"==typeof e.label&&(!e.selectedKeys||Array.isArray(e.selectedKeys)))("string"==typeof a?(()=>{try{return parseJson(a)}catch(e){return}})():a)&&setState(e,"_selection",a)};var Callback;!function(e){e.onBlur="onBlur",e.onChange="onChange",e.onChangePage="onChangePage",e.onClick="onClick",e.onClose="onClose",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.onSelectionChange="onSelectionChange",e.onChangePageSize="onChangePageSize",e.onSort="onSort",e.onSubmit="onSubmit",e.onToggle="onToggle"}(Callback||(Callback={}));export{Callback as C,validateTableDataFoot as a,validateTableSelection as b,validateTableStatefulCallbacks as c,validateTableCallbacks as d,validateTableData as v};