<?xml version="1.0" encoding="UTF-8"?>

<?import com.marvinelsen.willow.domain.SearchMode?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="com.marvinelsen.willow.ui.controllers.SearchController" spacing="8">
    <TextField fx:id="textFieldSearch" promptText="%search.prompt" HBox.hgrow="ALWAYS"/>
    <FlowPane hgap="8.0" vgap="8.0">
        <Label text="%search.mode"/>
        <RadioButton mnemonicParsing="false" selected="true" text="%search.mode.simplified">
            <toggleGroup>
                <ToggleGroup fx:id="searchModeToggleGroup"/>
            </toggleGroup>
            <userData>
                <SearchMode fx:value="SIMPLIFIED"/>
            </userData>
        </RadioButton>
        <RadioButton mnemonicParsing="false" text="%search.mode.traditional"
                     toggleGroup="$searchModeToggleGroup">
            <userData>
                <SearchMode fx:value="TRADITIONAL"/>
            </userData>
        </RadioButton>
        <RadioButton mnemonicParsing="false" text="%search.mode.pinyin"
                     toggleGroup="$searchModeToggleGroup">
            <userData>
                <SearchMode fx:value="PINYIN"/>
            </userData>
        </RadioButton>
        <RadioButton mnemonicParsing="false" text="%search.mode.english"
                     toggleGroup="$searchModeToggleGroup">
            <userData>
                <SearchMode fx:value="ENGLISH"/>
            </userData>
        </RadioButton>
    </FlowPane>
</VBox>
