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 __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import Project from "./Project";
import StatusPage from "./StatusPage";
import User from "./User";
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
import OwnedThrough from "../../Types/Database/AccessControl/OwnedThrough";
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
import CanAccessIfCanReadOn from "../../Types/Database/CanAccessIfCanReadOn";
import ColumnLength from "../../Types/Database/ColumnLength";
import ColumnType from "../../Types/Database/ColumnType";
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
import SlugifyColumn from "../../Types/Database/SlugifyColumn";
import TableColumn from "../../Types/Database/TableColumn";
import TableColumnType from "../../Types/Database/TableColumnType";
import TableMetadata from "../../Types/Database/TableMetadata";
import TenantColumn from "../../Types/Database/TenantColumn";
import UniqueColumnBy from "../../Types/Database/UniqueColumnBy";
import IconProp from "../../Types/Icon/IconProp";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import UptimePrecision from "../../Types/StatusPage/UptimePrecision";
import StatusPageGroupViewMode from "../../Types/StatusPage/StatusPageGroupViewMode";
let StatusPageGroup = class StatusPageGroup extends BaseModel {
    constructor() {
        super(...arguments);
        this.project = undefined;
        this.projectId = undefined;
        this.statusPage = undefined;
        this.statusPageId = undefined;
        this.name = undefined;
        this.slug = undefined;
        this.description = undefined;
        this.createdByUser = undefined;
        this.createdByUserId = undefined;
        this.order = undefined;
        this.isExpandedByDefault = undefined;
        this.deletedByUser = undefined;
        this.deletedByUserId = undefined;
        this.showCurrentStatus = undefined;
        this.showUptimePercent = undefined;
        this.uptimePercentPrecision = undefined;
        this.viewMode = undefined;
        this.rowAxisLabel = undefined;
        this.columnAxisLabel = undefined;
        this.rowAxisValues = undefined;
        this.columnAxisValues = undefined;
    }
};
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "projectId",
        type: TableColumnType.Entity,
        modelType: Project,
        title: "Project",
        description: "Relation to Project Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return Project;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "projectId" }),
    __metadata("design:type", Project)
], StatusPageGroup.prototype, "project", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "Project ID",
        description: "ID of your OneUptime Project in which this object belongs",
        example: "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], StatusPageGroup.prototype, "projectId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "statusPageId",
        type: TableColumnType.Entity,
        modelType: StatusPage,
        title: "Status Page",
        description: "Relation to Status Page Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return StatusPage;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "statusPageId" }),
    __metadata("design:type", StatusPage)
], StatusPageGroup.prototype, "statusPage", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        title: "Status Page ID",
        description: "ID of your Status Page resource where this object belongs",
        example: "f6a7b8c9-d0e1-2345-6789-abcdef012345",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], StatusPageGroup.prototype, "statusPageId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        title: "Group Name",
        description: "Name of the Group",
        canReadOnRelationQuery: true,
        example: "Core Services",
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    UniqueColumnBy("statusPageId"),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "name", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    TableColumn({
        required: true,
        unique: true,
        type: TableColumnType.Slug,
        title: "Slug",
        description: "Friendly globally unique name for your object",
        computed: true,
        example: "core-services",
    }),
    Column({
        nullable: false,
        type: ColumnType.Slug,
        length: ColumnLength.Slug,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "slug", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.Markdown,
        title: "Description",
        description: "Description for this group. This is visible on Status Page. This can be in markdown format.",
        example: "Critical infrastructure services including API, database, and authentication",
    }),
    Column({
        nullable: true,
        type: ColumnType.Markdown,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "description", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "createdByUserId",
        type: TableColumnType.Entity,
        modelType: User,
        title: "Created by User",
        description: "Relation to User who created this object (if this object was created by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "createdByUserId" }),
    __metadata("design:type", User)
], StatusPageGroup.prototype, "createdByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Created by User ID",
        description: "User ID who created this object (if this object was created by a User)",
        example: "f2a3b4c5-d6e7-89ab-cdef-012345678901",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], StatusPageGroup.prototype, "createdByUserId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        type: TableColumnType.Number,
        title: "Order",
        description: "Order / Priority of this resource",
        canReadOnRelationQuery: true,
    }),
    Column({
        type: ColumnType.Number,
    }),
    __metadata("design:type", Number)
], StatusPageGroup.prototype, "order", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Expanded by Default",
        description: "Is this group expanded by default on Status Page?",
        defaultValue: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: true,
    }),
    __metadata("design:type", Boolean)
], StatusPageGroup.prototype, "isExpandedByDefault", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "deletedByUserId",
        type: TableColumnType.Entity,
        title: "Deleted by User",
        modelType: User,
        description: "Relation to User who deleted this object (if this object was deleted by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        cascade: false,
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "deletedByUserId" }),
    __metadata("design:type", User)
], StatusPageGroup.prototype, "deletedByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Deleted by User ID",
        description: "User ID who deleted this object (if this object was deleted by a User)",
        example: "a3b4c5d6-e7f8-9abc-def0-123456789012",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], StatusPageGroup.prototype, "deletedByUserId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Show current status",
        description: "Show current status like offline, operational or degraded.",
        defaultValue: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: true,
    }),
    __metadata("design:type", Boolean)
], StatusPageGroup.prototype, "showCurrentStatus", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Show Uptime Percent",
        description: "Show uptime percent of this group for the last 90 days",
        defaultValue: false,
    }),
    Column({
        type: ColumnType.Boolean,
        default: false,
    }),
    __metadata("design:type", Boolean)
], StatusPageGroup.prototype, "showUptimePercent", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        type: TableColumnType.ShortText,
        title: "Uptime Percent Precision",
        required: false,
        description: "Precision of uptime percent of this group for the last 90 days",
    }),
    Column({
        type: ColumnType.ShortText,
        nullable: true,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "uptimePercentPrecision", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        type: TableColumnType.ShortText,
        title: "View Mode",
        required: false,
        description: "Layout of this group on the status page. 'List' renders resources stacked vertically (default). 'Grid' renders resources as a matrix using row and column axes.",
        defaultValue: StatusPageGroupViewMode.List,
    }),
    Column({
        type: ColumnType.ShortText,
        nullable: true,
        default: StatusPageGroupViewMode.List,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "viewMode", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        type: TableColumnType.ShortText,
        title: "Row Axis Label",
        required: false,
        description: "Label shown above the row axis when the group is rendered as a grid (e.g. 'Service', 'Tenant'). Free-form so you can use any dimension you like.",
    }),
    Column({
        nullable: true,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "rowAxisLabel", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        type: TableColumnType.ShortText,
        title: "Column Axis Label",
        required: false,
        description: "Label shown above the column axis when the group is rendered as a grid (e.g. 'Region', 'Environment'). Free-form so you can use any dimension you like.",
    }),
    Column({
        nullable: true,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "columnAxisLabel", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.LongText,
        title: "Row Axis Values",
        description: "Comma-separated list of row labels for the grid (e.g. 'Auth, API, Database'). Determines row order in the grid layout.",
    }),
    Column({
        nullable: true,
        type: ColumnType.LongText,
        length: ColumnLength.LongText,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "rowAxisValues", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.LongText,
        title: "Column Axis Values",
        description: "Comma-separated list of column labels for the grid (e.g. 'US-East, EU-West, Asia'). Determines column order in the grid layout.",
    }),
    Column({
        nullable: true,
        type: ColumnType.LongText,
        length: ColumnLength.LongText,
    }),
    __metadata("design:type", String)
], StatusPageGroup.prototype, "columnAxisValues", void 0);
StatusPageGroup = __decorate([
    EnableDocumentation(),
    TableBillingAccessControl({
        create: PlanType.Growth,
        read: PlanType.Free,
        update: PlanType.Growth,
        delete: PlanType.Free,
    }),
    CanAccessIfCanReadOn("statusPage"),
    TenantColumn("projectId"),
    TableAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.CreateStatusPageGroup,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.StatusPageViewer,
            Permission.ReadStatusPageGroup,
        ],
        delete: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.DeleteStatusPageGroup,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.StatusPageAdmin,
            Permission.StatusPageMember,
            Permission.EditStatusPageGroup,
        ],
    }),
    EnableWorkflow({
        create: true,
        delete: true,
        update: true,
        read: true,
    }),
    CrudApiEndpoint(new Route("/status-page-group")),
    SlugifyColumn("name", "slug"),
    TableMetadata({
        tableName: "StatusPageGroup",
        singularName: "Status Page Group",
        pluralName: "Status Page Groups",
        icon: IconProp.Folder,
        tableDescription: "Manage groups on your status page and categorize resources like monitors into these groups.",
    }),
    OwnedThrough("statusPageId", StatusPage),
    Entity({
        name: "StatusPageGroup",
    })
], StatusPageGroup);
export default StatusPageGroup;
//# sourceMappingURL=StatusPageGroup.js.map