<template name="measureFlow">
    <div class="measure-flow {{#if this.threeColumns}}tree-columns{{/if}} {{instance.state.get}}"
         style="top:{{choose position.y 0}}px; left:{{choose position.x 0}}px"
         tabindex="-1">
        <button class="btn-add" style="opacity: 0">
            {{#if this.measurement.location}}Edit{{else}}Add{{/if}} label
        </button>
        {{#if eq instance.state.get 'selected'}}
            <div class="tree-leaf">
                <i class="icon-check"></i>
                <span>{{instance.value.label}}</span>
                {{#if instance.descriptionEdit.get}}
                    <div class="description clearfix">
                        <textarea
                            class="pull-left"
                            rows="1"
                            style="{{#unless instance.description.get}}height:0{{/unless}}"
                        >{{instance.description.get}}</textarea>
                    </div>
                {{else}}
                    {{#if instance.description.get}}
                        <div class="descriptionText">{{instance.description.get}}</div>
                    {{/if}}
                {{/if}}
                <div class="actions clearfix">
                    <button class="pull-left btn-rename">Relabel</button>
                    <button class="pull-right btn-description">{{valueIf instance.description.get 'Edit' 'Add'}} description</button>
                </div>
            </div>
        {{/if}}
    </div>
</template>
