import {
  defineListRouteStateSchema,
  positiveIntegerListRouteField,
  stringListRouteField,
} from '#/composables/useListRouteState';

interface AgentListRouteState {
  categoryId: string;
  keyword: string;
  pageNumber: number;
  pageSize: number;
}

const agentListRouteSchema = defineListRouteStateSchema<AgentListRouteState>({
  path: '/ai/agents',
  fields: {
    categoryId: stringListRouteField(),
    keyword: stringListRouteField(),
    pageNumber: positiveIntegerListRouteField({ defaultValue: 1 }),
    pageSize: positiveIntegerListRouteField({
      allowedValues: [12, 18, 24],
      defaultValue: 12,
    }),
  },
});

export { agentListRouteSchema };
export type { AgentListRouteState };
