{% include '_header.jinja' %}

'use client';

/**
 * SWR Hooks for {{ tag_display_name }}
 *
 * React hooks powered by SWR for data fetching with automatic caching,
 * revalidation, and optimistic updates.
 *
 * Usage:
 * ```typescript
 * // Query hooks (GET)
 * const { data, error, isLoading } = useUsers({ page: 1 })
 *
 * // Mutation hooks (POST/PUT/PATCH/DELETE)
 * const createUser = useCreateUser()
 * await createUser({ name: 'John', email: 'john@example.com' })
 * ```
 */
{% if has_queries %}
import useSWR from 'swr'
{% endif %}
{% if has_mutations %}
import { useSWRConfig } from 'swr'
{% endif %}
import * as Fetchers from '../fetchers/{{ tag_file }}'
import type { API } from '../../index'
{% if has_schemas %}
{% for schema_name in schema_names %}
import type { {{ schema_name }} } from '../schemas/{{ schema_name }}.schema'
{% endfor %}
{% endif %}

{% for hook in hooks %}
{{ hook }}

{% endfor %}

