import type { GeneralSettings } from '../types' import { createSectionRegistry } from '../utils/section-registry' import { ChannelAffinitySection } from './channel-affinity' import { CheckinSettingsSection } from './checkin-settings-section' import { PricingSection } from './pricing-section' import { QuotaSettingsSection } from './quota-settings-section' import { SystemBehaviorSection } from './system-behavior-section' import { SystemInfoSection } from './system-info-section' const GENERAL_SECTIONS = [ { id: 'system-info', titleKey: 'System Information', descriptionKey: 'Configure basic system information and branding', build: (settings: GeneralSettings) => ( ), }, { id: 'quota', titleKey: 'Quota Settings', descriptionKey: 'Configure user quota allocation and rewards', build: (settings: GeneralSettings) => ( ), }, { id: 'pricing', titleKey: 'Pricing & Display', descriptionKey: 'Configure pricing model and display options', build: ( settings: GeneralSettings, quotaDisplayType: 'USD' | 'CNY' | 'TOKENS' | 'CUSTOM' ) => ( ), }, { id: 'checkin', titleKey: 'Check-in Settings', descriptionKey: 'Configure daily check-in rewards for users', build: (settings: GeneralSettings) => ( ), }, { id: 'behavior', titleKey: 'System Behavior', descriptionKey: 'Configure system-wide behavior and defaults', build: (settings: GeneralSettings) => ( ), }, { id: 'channel-affinity', titleKey: 'Channel Affinity', descriptionKey: 'Configure channel affinity (sticky routing) rules', build: (settings: GeneralSettings) => ( ), }, ] as const export type GeneralSectionId = (typeof GENERAL_SECTIONS)[number]['id'] const generalRegistry = createSectionRegistry< GeneralSectionId, GeneralSettings, ['USD' | 'CNY' | 'TOKENS' | 'CUSTOM'] >({ sections: GENERAL_SECTIONS, defaultSection: 'system-info', basePath: '/system-settings/general', urlStyle: 'path', }) export const GENERAL_SECTION_IDS = generalRegistry.sectionIds export const GENERAL_DEFAULT_SECTION = generalRegistry.defaultSection export const getGeneralSectionNavItems = generalRegistry.getSectionNavItems export const getGeneralSectionContent = generalRegistry.getSectionContent