<section class="gh-canvas">
    <form class="mb15">
        <GhCanvasHeader class="gh-canvas-header">
            <div class="flex flex-column">
                <div class="gh-canvas-breadcrumb">
                    <LinkTo @route="tags" data-test-link="tags-back">
                        Tags
                    </LinkTo>
                    {{svg-jar "arrow-right-small"}} {{if this.tag.isNew "New tag" "Edit tag"}}
                </div>
                <h2 class="gh-canvas-title" data-test-screen-title>
                    {{if this.tag.isNew "New tag" this.tag.name}}
                </h2>
            </div>

            <section class="view-actions">
                <GhTaskButton
                    @task={{this.saveTask}}
                    @type="button"
                    @class="gh-btn gh-btn-primary gh-btn-icon"
                    @data-test-button="save"
                    {{on-key "cmd+s"}}
                />
            </section>
        </GhCanvasHeader>

        <Tags::TagForm @tag={{this.model}} />
    </form>

    {{#unless this.tag.isNew}}
        <div>
            <button type="button" class="gh-btn gh-btn-red gh-btn-icon" {{on "click" this.confirmDeleteTag}} data-test-button="delete-tag">
                <span>Delete tag</span>
            </button>
        </div>
    {{/unless}}
</section>