import { ConfigRule, ItemWithId, UseConfigRulesOptions, UseConfigRulesResult } from './types';
export type { ConfigRule, ConfigWithRules, ItemWithId, Permissions, UseConfigRulesOptions, UseConfigRulesResult, } from './types';
/**
 * Generic hook to extract department-specific rules and permissions from configuration
 *
 * This hook:
 * 1. Filters configuration rules based on current department
 * 2. Extracts permissions (allowToView, allowToWrite, defaultView, defaultWrite)
 * 3. Validates that defaultWrite is in the allowToWrite list
 * 4. Applies default behavior (if defaultView is empty, use all allowToView items)
 *
 * @example
 * ```tsx
 * const { activeRule, permissions } = useConfigRules({
 *   config,
 *   getRules: (config) => config.rules,
 *   currentDepartmentId: context?.department?.id,
 *   debug: true
 * })
 *
 * // Use permissions
 * const canViewIds = permissions.canView.map(item => item.id)
 * const canWriteIds = permissions.canWrite.map(item => item.id)
 * ```
 */
export declare const useConfigRules: <TConfig, TRule extends ConfigRule<TItem>, TItem extends ItemWithId = ItemWithId>(options: UseConfigRulesOptions<TConfig, TRule>) => UseConfigRulesResult<TRule, TItem>;
//# sourceMappingURL=use-config-rules.d.ts.map