/**
 * @openapi
 * /api/roles:
 *   get:
 *     tags: [Roles]
 *     summary: List roles (tenant-scoped)
 *     description: Requires READ_ROLES.
 *     responses:
 *       200:
 *         description: List payload.
 *         content:
 *           application/json:
 *             schema: { $ref: '#/components/schemas/ListResponse' }
 *       401: { $ref: '#/components/responses/UnauthorizedError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *   post:
 *     tags: [Roles]
 *     summary: Create a roles record
 *     description: Requires CREATE_ROLES.
 *     responses:
 *       200: { description: Created. }
 *       400: { $ref: '#/components/responses/ValidationError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/roles/count:
 *   get:
 *     tags: [Roles]
 *     summary: Count roles
 *     description: Requires READ_ROLES.
 *     responses:
 *       200: { description: Count. }
 * /api/roles/autocomplete:
 *   get:
 *     tags: [Roles]
 *     summary: Autocomplete roles
 *     description: Requires READ_ROLES.
 *     responses:
 *       200: { description: Autocomplete results. }
 * /api/roles/bulk-import:
 *   post:
 *     tags: [Roles]
 *     summary: Bulk-import roles from CSV
 *     description: Requires CREATE_ROLES.
 *     responses:
 *       200: { description: Imported. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/roles/deleteByIds:
 *   post:
 *     tags: [Roles]
 *     summary: Delete multiple roles records
 *     description: Requires DELETE_ROLES.
 *     responses:
 *       200: { description: Deleted. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/roles/{id}:
 *   get:
 *     tags: [Roles]
 *     summary: Get a roles record by id
 *     description: Requires READ_ROLES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: The record. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *       404: { description: Not found. }
 *   put:
 *     tags: [Roles]
 *     summary: Update a roles record
 *     description: Requires UPDATE_ROLES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: Updated. }
 *       400: { $ref: '#/components/responses/ValidationError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *   delete:
 *     tags: [Roles]
 *     summary: Delete a roles record
 *     description: Requires DELETE_ROLES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: Deleted. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 */
import controller from '@/api/controllers/roles.controller';
import { createCrudRouter } from '@/api/http/crud-router';

export default createCrudRouter(controller, { permission: 'roles' });
