UNPKG

@designliquido/foles

Version:

Linguagem de folhas de estilo para documentos em geral em português

29 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConjuntoEstilos = void 0; const metodo_1 = require("./metodo"); class ConjuntoEstilos extends metodo_1.Metodo { constructor(valor1, valor2, valor3) { super(); this.valor1 = Number(valor1.lexema); this.valor2 = valor2 ? Number(valor2.lexema) : null; this.valor3 = valor3 ? Number(valor3.lexema) : null; this.traducao = "styleset"; } paraTexto() { if ((this.valor1 < 1 || this.valor1 > 20) || (this.valor2 && this.valor2 < 1 || this.valor2 > 20) || (this.valor3 && this.valor3 < 1 || this.valor3 > 20)) { throw new Error('Os valores da função conjunto-estilos() devem estar entre 1 e 20'); } if (this.valor2 && this.valor3) { return `styleset(${this.valor1}, ${this.valor2}, ${this.valor3})`; } if (this.valor2) { return `styleset(${this.valor1}, ${this.valor2})`; } return `styleset(${this.valor1})`; } } exports.ConjuntoEstilos = ConjuntoEstilos; //# sourceMappingURL=conjunto-estilos.js.map