1 | import type { ConfigRecipes } from "./generated/recipes.gen";
|
2 | import type { RecipeDefinition, RecipeVariantMap, RecipeVariantProps, SystemRecipeFn } from "./recipe.types";
|
3 | export type RecipeKey = keyof ConfigRecipes | (string & {});
|
4 | export interface UseRecipeOptions<K extends RecipeKey> {
|
5 | key?: K;
|
6 | recipe?: RecipeDefinition;
|
7 | }
|
8 | export declare function useRecipe<Options extends {
|
9 | key: RecipeKey;
|
10 | recipe?: RecipeDefinition;
|
11 | }>(options: Options): Options["key"] extends keyof ConfigRecipes ? ConfigRecipes[Options["key"]] : SystemRecipeFn<{}, {}>;
|
12 | export declare function useRecipe<Options extends {
|
13 | recipe: RecipeDefinition;
|
14 | }>(options: Options): Options["recipe"] extends RecipeDefinition<infer T> ? SystemRecipeFn<RecipeVariantProps<Options["recipe"]>, RecipeVariantMap<T>> : never;
|