import { CommonProps } from "../../typings/PCRCommonProps";

/**
 * A generic way to setup controlled components by
 * removing  state hook return results, setting `checked`,
 * and `value` props too.
 */
declare export var useControlled: <S, P: CommonProps<S>>(
  props: P
) => {
  ...{
    checked: boolean | void,
    value: string | number | $ReadOnlyArray<string> | void,
    state: S | void,
    ...
  },
  ...Omit<P, "state" | "setState" | "value" | "checked" | "defaultValue">,
};
