<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:extensions="clr-namespace:PlantBox.Client.Extensions"
             x:Class="PlantBox.Client.Forms.Settings.SettingsPage"
             BindingContext="{StaticResource Settings}">
    <ContentPage.Resources>
        <Style TargetType="TextCell">
            <Setter x:Name="TextCellStyle" Property="TextColor" Value="Green" />
        </Style>
    </ContentPage.Resources>
    <ContentPage.Content>
        <TableView x:Name="table" Intent="Settings">
            <TableRoot>
                <TableSection Title="{extensions:Locale General}">
                    <TextCell Text="{extensions:Locale LanguageSetting}"
                              Detail="{extensions:Locale LanguageSettingDetail}"
                              Tapped="Language_Tapped" />
                </TableSection>
                <TableSection Title="{extensions:Locale Notifications}">
                    <SwitchCell Text="{extensions:Locale NotificationsDisabled}"
                                On="{Binding NotificationsDisabled}" />
                    <SwitchCell Text="{extensions:Locale NotificationsMuted}"
                                On="{Binding NotificationsMuted}" />
                </TableSection>
                <TableSection Title="{extensions:Locale Server}">
                    <EntryCell Label="IP: "
                               LabelColor="Accent"
                               Placeholder="ip"
                               Text="{Binding BrokerIP}"/>
                </TableSection>
            </TableRoot>
        </TableView>
    </ContentPage.Content>
</ContentPage>