import { Identifier } from '../types'; /** * State-like hook for controlling the expanded state of a list item * * @param {string} resource The resource name, e.g. 'posts' * @param {string|integer} id The record identifier, e.g. 123 * * @returns {Object} Destructure as [expanded, toggleExpanded]. * * @example * * const [expanded, toggleExpanded] = useExpanded('posts', 123); * const expandIcon = expanded ? ExpandLess : ExpandMore; * const onExpandClick = () => toggleExpanded(); */ declare const useExpanded: (resource: string, id: Identifier) => [boolean, () => void]; export default useExpanded;