import { elem } from "@d3plus/dom";
/**
    Draws a back button if there are states in this._history.
    @private
*/ export default function() {
    var visible = this._history.length;
    var backGroup = elem("g.d3plus-viz-back", {
        parent: this._select,
        duration: this._duration,
        update: {
            transform: "translate(".concat(this._margin.left, ", ").concat(this._margin.top, ")")
        }
    }).node();
    this._backClass.data(visible ? [
        {
            text: "← ".concat(this._translate("Back")),
            x: 0,
            y: 0
        }
    ] : []).select(backGroup).config(this._backConfig).render();
    this._margin.top += visible ? this._backClass.fontSize()() + this._backClass.padding()() * 2 : 0;
}
