"use client";
import * as React from "react";
import { CheckboxRootDataAttributes } from "../root/CheckboxRootDataAttributes.js";
import { fieldValidityMapping } from "../../field/utils/constants.js";
function useStateAttributesMapping(state) {
  return React.useMemo(() => ({
    checked(value) {
      if (state.indeterminate) {
        return {};
      }
      if (value) {
        return {
          [CheckboxRootDataAttributes.checked]: ""
        };
      }
      return {
        [CheckboxRootDataAttributes.unchecked]: ""
      };
    },
    ...fieldValidityMapping
  }), [state.indeterminate]);
}
export {
  useStateAttributesMapping
};
//# sourceMappingURL=useStateAttributesMapping.js.map
