import React from 'react' import { Head } from '@inertiajs/react' import AdminLayout from '../../Layouts/AdminLayout' const SETTING_GROUPS = [ { label: 'Platform', items: [ { key: 'site_name', label: 'Site Name', type: 'text', description: 'The public name of the platform' }, { key: 'site_description', label: 'Site Description', type: 'textarea', description: 'Short tagline shown in meta tags' }, { key: 'maintenance_mode', label: 'Maintenance Mode', type: 'toggle', description: 'Put the site into maintenance mode' }, ], }, { label: 'Registration', items: [ { key: 'registration_open', label: 'Open Registration', type: 'toggle', description: 'Allow new users to register' }, { key: 'require_invite', label: 'Require Invite', type: 'toggle', description: 'New users must have an invite code' }, ], }, ] export default function AdminSettings({ settings = {} }) { return (
{SETTING_GROUPS.map((group) => (

{group.label}

{group.items.map((item) => (

{item.label}

{item.description}

{item.type === 'toggle' ? (
) : item.type === 'textarea' ? (