/*
    Парус 8 - Панели мониторинга - УДП - Доски задач
    Компонент: Общие стили
*/

//---------------------
//Подключение библиотек
//---------------------

import { APP_STYLES } from "../../../app.styles"; //Типовые стили

//---------
//Константы
//---------

//Общие стили
export const COMMON_STYLES = {
    TASK_FORM_TEXT_FIELD: (widthVal, greyDisabled = false) => ({
        margin: "4px",
        ...(widthVal ? { width: widthVal } : {}),
        ...(greyDisabled
            ? {
                  "& .MuiInputBase-input.Mui-disabled": {
                      WebkitTextFillColor: "rgba(0, 0, 0, 0.87)"
                  },
                  "& .MuiInputLabel-root.Mui-disabled": {
                      WebkitTextFillColor: "rgba(0, 0, 0, 0.6)"
                  }
              }
            : {})
    }),
    BOX_WITH_LEGEND: { border: "1px solid #939393", marginBottom: "1px" },
    BOX_SINGLE_COLUMN: { display: "flex", flexDirection: "column", gap: "10px" },
    LEGEND: { textAlign: "left" },
    SELECT_MENU: width => {
        return { overflowY: "auto", ...APP_STYLES.SCROLL, width: width ? width : null };
    },
    STACK_DOCLINKS: { alignItems: "baseline" },
    SCROLL: { ...APP_STYLES.SCROLL, overflowY: "auto" },
    DIALOG_ACTIONS: { justifyContent: "end", paddingRight: "24px", paddingLeft: "24px" },
    DIALOG_CLOSE_BUTTON: {
        position: "absolute",
        right: 8,
        top: 8,
        color: theme => theme.palette.grey[500]
    },
    ZERO_PADDING: { padding: 0 }
};
