/*
 * Hevy Gym Tracker - Settings Page
 * Accessible from Fitbit mobile app
 */

registerSettingsPage(({ settings }) => (
  <Page>
    {/* Rest Timer Settings */}
    <Section title="Rest Timer">
      <TextInput
        settingsKey="restTimerDuration"
        label="Default duration (seconds)"
        value="90"
      />
    </Section>

    {/* Display Settings */}
    <Section title="Display">
      <Toggle
        settingsKey="showHeartRate"
        label="Show Heart Rate"
        defaultValue={true}
      />
      <Toggle
        settingsKey="vibrationEnabled"
        label="Vibration Alerts"
        defaultValue={true}
      />
    </Section>

    {/* Weight Unit */}
    <Section title="Units">
      <Select
        settingsKey="weightUnit"
        label="Weight Unit"
        options={[
          { name: "Kilograms", value: "kg" },
          { name: "Pounds", value: "lbs" }
        ]}
        value="kg"
      />
    </Section>

    {/* Workout Settings */}
    <Section title="Workout">
      <Toggle
        settingsKey="autoStartTimer"
        label="Auto-start Rest Timer"
        defaultValue={true}
      />
    </Section>

    {/* About */}
    <Section title="About">
      <Text>Hevy Gym Tracker v1.0.0</Text>
      <Text>Ported from Hevy WearOS</Text>
    </Section>
  </Page>
));
