<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<section class="spec-parent">
    <a ui-sref="{{state.view.name}}({{state.view.params | json}})">{{(state.entity | entityName) || 'New application'}}</a>
</section>

<section class="spec-dsl">
    <ol class="breadcrumb">
        <li>Editing DSL for: <span ng-if="state.index"><code>{{state.index}}</code> in&nbsp;</span><code>{{state.definition.name}}</code></li>
        <li ng-repeat="breadcrumb in breadcrumbs track by $index" ng-class="{'active': $last}">
            <a ui-sref="{{breadcrumb.view.name}}({{breadcrumb.view.params | json}})">
                formatString(<span ng-repeat="(paramIndex, param) in breadcrumb.dsl.params track by param._id" ><code ng-if="breadcrumb.index === paramIndex">{{param | dslParamLabel}}</code><span ng-if="breadcrumb.index !== paramIndex">{{param | dslParamLabel}}</span><span ng-if="!$last">,&nbsp;</span></span>)
            </a>
        </li>
    </ol>

    <dsl-editor definition="state.definition" entity="state.entity" dsl="state.dsl"></dsl-editor>
</section>
