typings/lib2/messagev2/common/tableHeading.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableHeading = void 0;
const internal_1 = require("../internal");
/**
 * Represents a table heading element.
 * @extends ChannelCustomizable
 */
class TableHeading extends internal_1.ChannelCustomizable {
    /**
     * Creates an instance of the TableHeading class.
     * @param {string} label The label of the table heading.
     */
    constructor(label) {
        super();
        this.alignment = internal_1.FieldAlignment.left;
        this.label = label;
    }
    /**
     * Gets the label of the table heading.
     * @returns {string} The label.
     */
    getLabel() {
        return this.label;
    }
    /**
     * Sets the label of the table heading.
     * @param {string} label The label to set.
     * @returns {TableHeading} The updated instance of the TableHeading.
     */
    setLabel(label) {
        this.label = label;
        return this;
    }
    /**
     * Gets the width of the table heading.
     * @returns {number} The width.
     */
    getWidth() {
        return this.width;
    }
    /**
     * Sets the width of the table heading.
     * @param {number} width The width to set.
     * @returns {TableHeading} The updated instance of the TableHeading.
     */
    setWidth(width) {
        this.width = width;
        return this;
    }
    /**
     * Gets the alignment of the table heading.
     * @returns {FieldAlignment} The alignment.
     */
    getAlignment() {
        return this.alignment;
    }
    /**
     * Sets the alignment of the table heading.
     * @param {FieldAlignment} alignment The alignment to set.
     * @returns {TableHeading} The updated instance of the TableHeading.
     */
    setAlignment(alignment) {
        this.alignment = alignment;
        return this;
    }
}
exports.TableHeading = TableHeading;