type WebhookPath<FormType extends FieldValues, Key extends ArrayPath<FormType>> = PathValue<
FormType,
Key
> extends WebhookModel[]
? Key
: never;
export interface WebhookOptionsProps<
FormType extends FieldValues,
Key extends ArrayPath<FormType>,
Key2 extends WebhookPath<FormType, Key>
> {
path: Key2;
control: Control<FormType>;
}
type WebhookPath<FormType extends FieldValues, Key extends ArrayPath<FormType>> = PathValue<
FormType,
Key
> extends WebhookModel[]
? Key
: never;
export interface WebhookOptionsProps<
FormType extends FieldValues,
Key extends ArrayPath<FormType>,
Key2 extends WebhookPath<FormType, Key>
> {
path: Key2;
control: Control<FormType>;
}