<script type="text/x-handlebars-template">

    <div>

        <div class="alpaca-array-toolbar" {{#compare options.toolbarStyle "button"}} btn-group{{/compare}}>

            {{#each arrayToolbarActions}}

                {{#compare ../options.toolbarStyle "link"}}
                    <a href="#" class="alpaca-array-toolbar-action" data-array-toolbar-action="{{action}}">{{{label}}}</a>
                {{/compare}}

                {{#compare ../options.toolbarStyle "button"}}
                    <button class="alpaca-array-toolbar-action btn {{../view.styles.button}}" data-array-toolbar-action="{{action}}">
                        {{#if iconClass}}
                        <i class="{{iconClass}}"></i>
                        {{/if}}
                        {{#if label}}{{{label}}}{{/if}}
                    </button>
                {{/compare}}

            {{/each}}

        </div>

        {{#each items}}

        <div>

            <div class="alpaca-array-item-actions btn-group">
                {{#each ../arrayItemActions}}
                <button class="alpaca-array-item-action {{../view.styles.button}}" data-array-item-action="{{action}}">
                    {{#if iconClass}}
                    <i class="{{iconClass}}"></i>
                    {{/if}}
                    {{#if label}}{{{label}}}{{/if}}
                </button>
                {{/each}}
            </div>

            {{#item}}{{/item}}

        </div>

        {{/each}}

    </div>

</script>