"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CellTestResultError = exports.CellValueLine = exports.CellValuesRenderInTester = exports.RuleEditorInTester = exports.RuleTableHeaderSplit = exports.RuleTableEmptyIndexColumn = exports.RuleTableEmptyAddColumn = exports.RuleLabelColumn = exports.RuleTableEmptyColumn = exports.RuleTableRuleColumn = exports.RuleTableHeaderActionColumn = exports.RuleTableIndexColumn = exports.RuleEditorRender = exports.RuleToolbarRender = exports.RuleDesignerRender = exports.RuleEditorDiv = void 0;
const tslib_1 = require("tslib");
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
const TestingConstants_1 = require("../../CommonUI/Testing/TestingConstants");
const UIStyleConstants_1 = require("@appglue/common/dist/Common/UIStyleConstants");
exports.RuleEditorDiv = styled_components_1.default.div `
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
`;
exports.RuleDesignerRender = styled_components_1.default.div `
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: auto;
    background: #f7f8fc;
    position: relative;
`;
exports.RuleToolbarRender = styled_components_1.default.div `
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px 8px;
    border-bottom: 3px solid rgba(96, 104, 129, 0.1);

    .RuleHeader-button {
        font-size: 12px;
        font-style: normal;
        line-height: 17px;
        letter-spacing: 0em;
        font-weight: 500;
        text-align: center;
        color: #4050a6;

        padding: 0;

        margin-left: 16px;

        &:first-child {
            margin-left: 0;
        }
    }
`;
exports.RuleEditorRender = styled_components_1.default.div `
    display: grid;
    padding: 16px 24px;
    justify-items: stretch;

    grid-template-columns: repeat(${(props) => props.columnCount + 3}, [col-start] max-content [col-end]);
    column-gap: ${(props) => props.columnsGap || 2}px;
    row-gap: ${(props) => props.rowsGap || 2}px;
`;
exports.RuleTableIndexColumn = styled_components_1.default.div `
    width: 24px;
    min-height: ${(props) => props.height || 24}px;

    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 17px;
    letter-spacing: 0px;

    ${(props) => (props.isTestPassed ? "background: rgba(53, 182, 135);" : "")}

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(64, 80, 166, 0.5);

    position: relative;

    ${(props) => props.x !== undefined
    ? `
                grid-column-start: ${props.x + 1};
                grid-column-end: ${props.x + 2};
            `
    : ``}
    ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}
  img {
        position: absolute;
        left: -20px;
        top: 50%;
        transform: translateY(-50%);
    }
`;
exports.RuleTableHeaderActionColumn = styled_components_1.default.div `
    display: flex;
    background: rgba(64, 80, 166, 0.1);
    border-radius: 2px;
    align-items: center;
    justify-content: center;
    width: 24px;

    ${(props) => (props.disabled ? "pointer-events: none;" : "")}
    cursor: pointer;
    ${(props) => props.x !== undefined
    ? `
                grid-column-start: ${props.x + 1};
                grid-column-end: ${props.x + 2};
            `
    : ``}
    ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}
`;
exports.RuleTableRuleColumn = styled_components_1.default.div `
    background: ${(props) => props.backgroundColor || UIStyleConstants_1.UIStyleConstants.WHITE_COLOR};
    border-radius: 2px;

    position: relative;

    transition: border-color 0.1s ease-in;

    //styleName: text/Inter Regular 12px;

    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: 0px;
    text-align: left;

    color: #272932;

    &:hover {
        border: 1px solid ${UIStyleConstants_1.UIStyleConstants.BLUE_GRAY_COLOR};
    }

    ${(props) => props.selected
    ? `border: 1px solid ${props.borderColor || UIStyleConstants_1.UIStyleConstants.BLUE_GRAY_COLOR};`
    : `border: 1px solid ${props.borderColor || "#F1F1F6"};`}

    ${(props) => props.x !== undefined
    ? `
                grid-column-start: ${props.x + 1};
                grid-column-end: ${props.x + 2};
                    `
    : ``}
  ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}
`;
exports.RuleTableEmptyColumn = styled_components_1.default.div `
    background: rgba(64, 80, 166, 0.05);
    min-width: 120px;
    border-radius: 2px;
    min-height: 24px;

    ${(props) => props.colSpan
    ? `
                grid-column-start: ${(props.colStart || 0) + 1};
                grid-column-end: ${(props.colStart || 0) + 1 + props.colSpan}`
    : ``}
`;
exports.RuleLabelColumn = styled_components_1.default.div `
    min-width: 120px;
    border-radius: 2px;
    min-height: 24px;

    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    -webkit-letter-spacing: 0px;
    -moz-letter-spacing: 0px;
    -ms-letter-spacing: 0px;
    letter-spacing: 0px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    color: ${UIStyleConstants_1.UIStyleConstants.GRAY_DARK_COLOR};

    padding: 5px 10px;

    ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}

    ${(props) => props.colSpan
    ? `
                grid-column-start: ${(props.colStart || 0) + 1};
                grid-column-end: ${(props.colStart || 0) + 1 + props.colSpan}`
    : ``}
`;
exports.RuleTableEmptyAddColumn = styled_components_1.default.div `
    ${(props) => (props.isTestPassed ? "background: rgba(53, 182, 135);" : "background: rgba(64, 80, 166, 0.1);")}

    width: 24px;
    border-radius: 2px;
    min-height: 24px;
    ${(props) => props.x !== undefined
    ? `
                grid-column-start: ${props.x + 1};
                grid-column-end: ${props.x + 2};
            `
    : ``}
    ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}
`;
exports.RuleTableEmptyIndexColumn = styled_components_1.default.div `
    background: rgba(64, 80, 166, 0.1);
    min-width: 24px;
    border-radius: 2px;
    min-height: 24px;

    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 17px;
    letter-spacing: 0px;

    display: flex;
    align-items: center;
    justify-content: center;

    ${(props) => (props.onClick ? (props.disabled ? "pointer-events: none;" : "cursor: pointer;") : "")}
`;
exports.RuleTableHeaderSplit = styled_components_1.default.div `
    min-width: ${(props) => props.width || 120}px;
    min-height: ${(props) => props.height || 1}px;
    background: rgba(64, 80, 166, 0.1);
    border-radius: 1px;

    ${(props) => props.x !== undefined
    ? `
                grid-column-start: ${props.x + 1};
                grid-column-end: ${props.x + 2};
            `
    : ``}
    ${(props) => props.y !== undefined
    ? `
                grid-row-start: ${props.y + 1};
                grid-row-end: ${props.y + 2};
            `
    : ``}
`;
exports.RuleEditorInTester = styled_components_1.default.div `
    display: flex;
    flex-direction: column;

    .RuleEditorRender {
        overflow: auto;
    }
`;
exports.CellValuesRenderInTester = styled_components_1.default.div `
    padding: 6px 12px;
    display: flex;
    flex-direction: column;

    position: relative;
    width: 100%;
    height: 100%;

    ${(props) => (props.isError ? `background: ${TestingConstants_1.TestingConstants.BACKGROUND_FAIL};` : "")}
`;
exports.CellValueLine = styled_components_1.default.div `
    margin-bottom: 5px;
    ${(props) => props.testResult === "true"
    ? `color: rgba(53, 182, 135);`
    : props.testResult === "false"
        ? `
                color: rgb(238, 62, 84);
                text-decoration: line-through;
            `
        : ``};
`;
exports.CellTestResultError = styled_components_1.default.div `
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    cursor: pointer;
`;
//# sourceMappingURL=CommonStyles.js.map