import { SettingsClient } from '@/components/admin/SettingsClient';
import { getSettings } from '@/lib/settings';
import { type SettingKey } from '@/lib/settings';

const allKeys: SettingKey[] = [
  'storeName',
  'storeEmail',
  'storePhone',
  'whatsappNumber',
  'bankName',
  'bankAccount',
  'bankInstructions',
  'mpesaConsumerKey',
  'mpesaConsumerSecret',
  'mpesaPasskey',
  'mpesaShortcode',
  'mpesaEnv',
  'smtpHost',
  'smtpPort',
  'smtpUser',
  'smtpPass',
  'smtpFrom',
];

export default async function SettingsPage() {
  const values = await getSettings(allKeys);
  return <SettingsClient initialValues={values} />;
}
