<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">
                <div class="view-actions-bottom-row">
                    <a href={{this.tagURL}} target="_blank" rel="noopener noreferrer" class="gh-btn gh-btn-icon-right gh-btn-action-icon"><span>View{{svg-jar "arrow-top-right"}}</span></a>
                    <GhTaskButton
                        @task={{this.saveTask}}
                        @type="button"
                        @class="gh-btn gh-btn-primary gh-btn-icon"
                        @data-test-button="save"
                        {{on-key "cmd+s"}}
                    />
                </div>
            </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>