"use strict";

var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };

var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };

var Node = _interopRequire(require("./node"));

// CSS comment between declarations or rules

var Comment = (function (Node) {
    function Comment(defaults) {
        _classCallCheck(this, Comment);

        this.type = "comment";
        Node.call(this, defaults);
    }

    _inherits(Comment, Node);

    // Stringify declaration

    Comment.prototype.stringify = function stringify(builder) {
        var before = this.style("before");
        if (before) builder(before);
        var left = this.style("left", "commentLeft");
        var right = this.style("right", "commentRight");
        builder("/*" + left + this.text + right + "*/", this);
    };

    return Comment;
})(Node);

module.exports = Comment;