fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
54 lines • 1.95 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OptionRdo = void 0;
const class_transformer_1 = require("class-transformer");
const internal_1 = require("../../internal");
class OptionRdo {
setValue(value) {
this.value = value;
return this;
}
setText(text) {
this.text.text = text;
}
setDescription(text) {
if (!this.description) {
this.description = { type: internal_1.ObjectType.Text, text };
}
else {
this.description.text = text;
}
return this;
}
}
exports.OptionRdo = OptionRdo;
_a = internal_1.Prop.OnSelect;
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "value", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "text", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "description", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, _a, void 0);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "setValue", null);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "setText", null);
__decorate([
(0, class_transformer_1.Expose)()
], OptionRdo.prototype, "setDescription", null);
//# sourceMappingURL=modal-block-option.rdo.js.map