﻿<?xml version="1.0" encoding="utf-8"?>

<engine:UXML
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:engine="UnityEngine.UIElements"
  xmlns:editor="UnityEditor.UIElements"
  xmlns:controls="NatsunekoLaboratory.Plana.Components"
  xsi:noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd">
  <engine:VisualElement class="margin-left:16px margin-right:16px">
    <engine:VisualElement class="margin-bottom:24px flex-shrink:0">
      <controls:Heading1 label="Plana" />
      <controls:Paragraph
        text="Plana (formerly Udon Obfuscator) is a powerful general purpose obfuscator for C#, but optimized for Unity and UdonSharp, containing a variety of features which provide protection for your source code from the hackers." />
    </engine:VisualElement>

    <engine:ScrollView class="flex-grow:1 padding:4px padding-bottom:8px">
      <controls:Section title="Preferences" class="margin-bottom:24px">
        <controls:ToggleGroup label="Obfuscate Solution" mode="EnabledWhenFalse" name="obfuscate-level">
          <controls:FileField label="Project" class="margin-top:2px margin-bottom:2px" filter="*.asmdef"
                              type="UnityEditorInternal.AssemblyDefinitionAsset, UnityEditor" name="workspace" />
        </controls:ToggleGroup>

        <controls:ToggleGroup label="Write In-Place" mode="EnabledWhenFalse" name="is-write-in-place">
          <controls:DirectoryField label="Output Dir" class="margin-top:2px margin-bottom:2px" name="output-dir" />
        </controls:ToggleGroup>

        <controls:DirectoryField label="Plugins Dir" name="plugins" />
        <controls:Checkbox label="Dry Run" name="is-dry-run" />
      </controls:Section>

      <controls:Section title="Plugins" class="margin-bottom:24px">
        <controls:ItemsControl name="items" />
        <controls:Button text="Scan Plugins" name="scan" disabled="true" />
      </controls:Section>

      <controls:Section title="Actions">
        <controls:Button text="Obfuscate" name="obfuscate" />
        <controls:Button text="Save Preferences" name="save-preferences" />
        <controls:Button text="Load Preferences" name="load-preferences" />
      </controls:Section>
    </engine:ScrollView>

  </engine:VisualElement>
</engine:UXML>