import { createPassword, type CreatePasswordOptions } from '../../../lib/create-password';

export interface UsePasswordGeneratorResult {
  generate(overrides?: Partial<CreatePasswordOptions>): string;
}

export const usePasswordGenerator = (
  defaults: CreatePasswordOptions,
): UsePasswordGeneratorResult => ({
  generate: (overrides) => createPassword({ ...defaults, ...overrides }),
});
