<commit_before><arethusa-navbar></arethusa-navbar>

<div class="row panel">
  <div class="colums small-12">
    <h3>Conf editor</h3>
      <strong>{{ fileName() }}</strong>
    <div>
      <ul class="button-group right">
        <li><button ng-click="save()" class="small">Save</button></li>
        <li><button ng-click="toggleDebugMode()" class="small">Debug</button></li>
      </ul>
    </div>
  </div>
  <div debug="conf"></div>
</div>

<div class="row panel">
  <div class="columns large-12">
    <form name="mainTemplateForm">
      <div class="large-3 columns">
        <label>Choose your main template:
          <input type="text" ng-model="main().template" class="columns small-6"/>
        </label>
      </div>
    </form>
  </div>
</div>

<div class="row panel">
  <h5>Data Sources</h5>
    <!--this is going to be a directive once the markup takes-->
    <!--more shape-->
    <ul class="button-group">
      <li ng-repeat="retrievers in main().retrievers">
        <span class="tiny button">
          {{ retrievers }}
        </span>
      </li>
    </ul>
</div>

<div class="row panel">
  <h5>Plugins</h5>
  <div>
    <ul class="button-group">
      <li ng-repeat="name in main().plugins">
        <span
          class="tiny button"
          ng-class="{alert: isMainPlugin(name)}"
          ng-click="toggleSelection('plugin', name)">
          {{ name }}
        </span>
      </li>
    </ul>
  </div>
  <div ng-repeat="name in main().plugins" ng-show="isSelected('plugin', name)">
    <plugin-conf name="name"></plugin-conf>
  </div>
  <form name="pluginAdder" ng-submit="addPlugin()">
    <div class="large-3 columns">
      <label>Add a plugin
        <input type="text" ng-model="pluginName" class="columns small-6"/>
      </label>
    </div>
  </form>
</div>

<div class="row panel">
  <h5>Resources</h5>
  <div>
    <ul class="button-group">
      <li ng-repeat="(name, resource) in resources()">
        <span class="tiny button" ng-click="toggleSelection('resource', name)">
          {{ name }}
        </span>
      </li>
    </ul>
    <div ng-repeat="(name, resource) in resources()" ng-show="isSelected('resource', name)">
      <div>
        {{ name }}
        <span class="tiny label alert" ng-click="removeResource(name)">Remove</span>
      </div>
      <div>
        <label>Route
          <input type="text" ng-model="resource.route" class="columns small-6"/>
        </label>
        <label>Params
          <input type="text" ng-model="resource.params" class="columns small-6"/>
        </label>
      </div>
    </div>
  </div>
  <form name="resourceAdder" ng-submit="addResource()">
    <div class="large-3 columns">
      <label>Create a resource
        <input type="text" ng-model="resourceName"/>
      </label>
    </div>
  </form>
</div>

<div class="row panel">
  <h5>Navbar</h5><commit_msg>Make removeResource button a little prettier<commit_after><arethusa-navbar></arethusa-navbar>

<div class="row panel">
  <div class="colums small-12">
    <h3>Conf editor</h3>
      <strong>{{ fileName() }}</strong>
    <div>
      <ul class="button-group right">
        <li><button ng-click="save()" class="small">Save</button></li>
        <li><button ng-click="toggleDebugMode()" class="small">Debug</button></li>
      </ul>
    </div>
  </div>
  <div debug="conf"></div>
</div>

<div class="row panel">
  <div class="columns large-12">
    <form name="mainTemplateForm">
      <div class="large-3 columns">
        <label>Choose your main template:
          <input type="text" ng-model="main().template" class="columns small-6"/>
        </label>
      </div>
    </form>
  </div>
</div>

<div class="row panel">
  <h5>Data Sources</h5>
    <!--this is going to be a directive once the markup takes-->
    <!--more shape-->
    <ul class="button-group">
      <li ng-repeat="retrievers in main().retrievers">
        <span class="tiny button">
          {{ retrievers }}
        </span>
      </li>
    </ul>
</div>

<div class="row panel">
  <h5>Plugins</h5>
  <div>
    <ul class="button-group">
      <li ng-repeat="name in main().plugins">
        <span
          class="tiny button"
          ng-class="{alert: isMainPlugin(name)}"
          ng-click="toggleSelection('plugin', name)">
          {{ name }}
        </span>
      </li>
    </ul>
  </div>
  <div ng-repeat="name in main().plugins" ng-show="isSelected('plugin', name)">
    <plugin-conf name="name"></plugin-conf>
  </div>
  <form name="pluginAdder" ng-submit="addPlugin()">
    <div class="large-3 columns">
      <label>Add a plugin
        <input type="text" ng-model="pluginName" class="columns small-6"/>
      </label>
    </div>
  </form>
</div>

<div class="row panel">
  <h5>Resources</h5>
  <div>
    <ul class="button-group">
      <li ng-repeat="(name, resource) in resources()">
        <span class="tiny button" ng-click="toggleSelection('resource', name)">
          {{ name }}
        </span>
      </li>
    </ul>
    <div ng-repeat="(name, resource) in resources()" ng-show="isSelected('resource', name)">
      <div>
        {{ name }}
        <a class="has-tip" tooltip-placement="right" tooltip="remove" ng-click="removeResource(name)">✘</a>
      </div>
      <div>
        <label>Route
          <input type="text" ng-model="resource.route" class="columns small-6"/>
        </label>
        <label>Params
          <input type="text" ng-model="resource.params" class="columns small-6"/>
        </label>
      </div>
    </div>
  </div>
  <form name="resourceAdder" ng-submit="addResource()">
    <div class="large-3 columns">
      <label>Create a resource
        <input type="text" ng-model="resourceName"/>
      </label>
    </div>
  </form>
</div>

<div class="row panel">
  <h5>Navbar</h5>
{'fraction_non_alphanumeric': 0.19780411293133496, 'fraction_numerical': 0.0073196235622168, 'mean_word_length': 2.6003764115432872, 'pattern_counts': {'":': 0, '<': 215, '<?xml version=': 0, '>': 215, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7461754', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1875, 'n_words': 422}