<!-- Composant de visualisation des objets partagés par l'ensemble des config de règles -->
<cfg-rules-infos
  id="updateCfgRulesInfos"
  featuretype="currentfeaturetype"
></cfg-rules-infos
><br />

<label class="rulesCfgTitle" translate>rulecfg.moveExtremityPoint.title</label
><br />
<div ng-if="currentfeaturetype.typeInfo == 'LINE' ">
  <div ng-if="editTypeList">
    <div class="ruleCfgEditTypeList" dual-list-box data="editTypeList"></div>
  </div>

  <table style=" text-align: center;" id="rulecfggetintersectedobjectsTab1">
    <tr>
      <td>
        <translate>rulecfg.moveExtremityPoint.intersectionlayers</translate>
      </td>
    </tr>
    <tr>
      <td>
        <select
          class="ruleCfgInput"
          ng-model="temp"
          ng-change="onLayerChange(temp)"
          ng-options="f as f.alias for f in featureTypes"
        >
          <option value="" translate>rulecfg.common.choiceprompt</option>
        </select>
      </td>
      <td ng-if="currentfeaturetype.typeInfo == 'LINE' ">
        <button
          type="button"
          class="btn btn-mini btn-danger"
          ng-click="addShareObject('amont')"
          translate
        >
          rulecfg.cutintersectingline.uphillAdd
        </button>
      </td>
      <td ng-if="currentfeaturetype.typeInfo == 'LINE' ">
        <button
          type="button"
          class="btn btn-mini btn-success"
          ng-click="addShareObject('aval')"
          translate
        >
          rulecfg.cutintersectingline.downhillAdd
        </button>
      </td>
    </tr>
  </table>

  <label
    ng-show="rule['parameters']['amont']['shareObjects'].length > 0"
    translate
    >rulecfg.cutintersectingline.uphillAdd</label
  ><br />
  <table
    ng-show="rule['parameters']['amont']['shareObjects'].length > 0"
    class="rulecfgcutintersectedLineTab"
    style="border-color:red;"
  >
    <tr>
      <th><translate>rulecfg.cutintersectingline.layersColumn</translate></th>
      <th>
        <translate>rulecfg.cutintersectingline.shareObjectNameColumn</translate>
      </th>
      <th>
        <translate
          >rulecfg.cutintersectingline.isToBeHistoricizeColumn</translate
        >
      </th>
      <th><translate>rulecfg.cutintersectingline.deleteColumn</translate></th>
    </tr>
    <tr ng-repeat="shareObject in rule['parameters']['amont']['shareObjects']">
      <td>{{shareObject.layerName}}</td>
      <!--           <td><input ng-model="shareObject.name" /></td> -->
      <td>
        <select
          class="ruleCfgInput"
          ng-model="shareObject.name"
          ng-options="shareObjName for shareObjName in allSharedObjectsNames"
        >
          <option value="" translate>rulecfg.common.choiceprompt</option>
        </select>
      </td>
      <td><input type="checkbox" ng-model="shareObject.isHistoricize" /></td>
      <td>
        <button
          type="button"
          class="btn btn-mini btn-danger"
          ng-click="removeShareObject($index,'amont')"
        >
          -
        </button>
      </td>
    </tr>
  </table>

  <label
    ng-show="rule['parameters']['aval']['shareObjects'].length > 0"
    translate
    >rulecfg.cutintersectingline.downhillAdd</label
  ><br />
  <table
    ng-show="rule['parameters']['aval']['shareObjects'].length > 0"
    class="rulecfgcutintersectedLineTab"
    style="border-color:greenyellow;"
  >
    <tr>
      <th><translate>rulecfg.cutintersectingline.layersColumn</translate></th>
      <th>
        <translate>rulecfg.cutintersectingline.shareObjectNameColumn</translate>
      </th>
      <th>
        <translate
          >rulecfg.cutintersectingline.isToBeHistoricizeColumn</translate
        >
      </th>
      <th><translate>rulecfg.cutintersectingline.deleteColumn</translate></th>
    </tr>
    <tr ng-repeat="shareObject in rule['parameters']['aval']['shareObjects']">
      <td>{{shareObject.layerName}}</td>
      <!--           <td><input ng-model="shareObject.name" /></td> -->
      <td>
        <select
          class="ruleCfgInput"
          ng-model="shareObject.name"
          ng-options="shareObjName for shareObjName in allSharedObjectsNames"
        >
          <option value="" translate>rulecfg.common.choiceprompt</option>
        </select>
      </td>
      <td><input type="checkbox" ng-model="shareObject.isHistoricize" /></td>
      <td>
        <button
          type="button"
          class="btn btn-mini btn-danger"
          ng-click="removeShareObject($index,'aval')"
        >
          -
        </button>
      </td>
    </tr>
  </table>
</div>
<div ng-if="currentfeaturetype.typeInfo != 'LINE' ">
  <translate>rulecfg.common.rulenotfitthislayer</translate>
</div>
