<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"
                  app:title="SMS Relay">

    <PreferenceCategory app:title="Forwarding">

        <SwitchPreferenceCompat
            app:key="enabled"
            app:title="Forward incoming SMS"
            app:summary="Forward SMS from whitelisted senders to centralcloud-ops. Requires base URL, device ID, and at least one sender."
            app:defaultValue="false"/>

        <EditTextPreference
            app:key="base_url"
            app:title="centralcloud-ops base URL"
            app:summary="e.g. https://ops.centralcloud.com (no trailing slash)"
            app:defaultValue=""
            app:useSimpleSummaryProvider="true"/>

        <EditTextPreference
            app:key="device_id"
            app:title="Device ID"
            app:summary="Token registered in centralcloud-ops push_subscriptions."
            app:defaultValue=""
            app:useSimpleSummaryProvider="true"/>

        <EditTextPreference
            app:key="whitelist"
            app:title="Sender whitelist"
            app:summary="Comma-separated list of sender addresses to forward. Anything else is ignored. e.g. UPTIME,+15551234567,HetznerMon"
            app:defaultValue=""
            app:useSimpleSummaryProvider="true"/>

    </PreferenceCategory>

    <PreferenceCategory app:title="Status">

        <Preference
            app:key="status_summary"
            app:title="Last forward"
            app:selectable="false"/>

        <Preference
            app:key="failure_summary"
            app:title="Recent failures"
            app:selectable="false"/>

    </PreferenceCategory>

</PreferenceScreen>
