import { r as reactExports, a6 as GridLoader, aM as checkCurrentUserRights, aN as ObjType, aO as DayMask, aP as HourMask, j as jsxRuntimeExports, G as Grid, x as Grid2, i as FormControlLabel, k as Checkbox, F as FormControl, aQ as FormLabel, aR as FormGroup, ai as Editor, I as IconButton, ay as ClearIcon, v as renderMessageBox, aS as Button, aT as DlgType, B as Button$1, ap as smetaModals, ah as AxiosRequest } from "./index-D15x63tD.js";
const styleFormControlBox = {
  border: "1px solid #ccc",
  borderRadius: "4px",
  paddingLeft: "10px",
  width: "93%",
  marginTop: "0px"
};
const mfInsert = 0, mfEdit = 1, mfDelete = 2;
function localCanModify(flag, me) {
  if (me.OnlyViewMode) return false;
  switch (flag) {
    case mfInsert:
      return me.getActiveSource().rights.insert;
    case mfEdit:
      return me.getActiveSource().rights.modify;
    case mfDelete:
      return me.getActiveSource().rights.delete;
  }
  return false;
}
const emptyBox = "0", arrowBlue = "10", arrowRed = "11";
function DialogTypeOfWorkTime({ props, smetaModalId = "" }) {
  const [checkboxes, setCheckboxes] = reactExports.useState({
    Рабочие: false,
    НеРабочие: false,
    Обычные: false,
    Праздники: false,
    Выходные: false,
    Короткие: false,
    Пн: false,
    Вт: false,
    Ср: false,
    Чт: false,
    Пт: false,
    Сб: false,
    Вс: false,
    Дневные: false,
    Ночные: false,
    Вечерние: false,
    ВремяПоНорме: false,
    МножОтрб: false,
    ПоказОбщийСписок: false
  });
  const [canModifyCheckBoxes, setCanModifyCheckBoxes] = reactExports.useState(false);
  const [selectedRecordID, setSelectedRecordID] = reactExports.useState("0");
  const [summ, setSumm] = reactExports.useState({ checkbox: false, data: [] });
  const [absenceText, setAbsenceText] = reactExports.useState("");
  const gridPanel = reactExports.useRef();
  const mainGrid = reactExports.useRef();
  reactExports.useEffect(() => {
    GridLoader(gridPanel.current, props, { onGetImageIndex: getImageIndex }).then(async (res) => {
      setCanModifyCheckBoxes(await checkCurrentUserRights(ObjType.DayHourCfgCode, mfEdit, true));
      res.grid.canModify = canModify;
      mainGrid.current = res;
      updCheckBoxStateByMask();
      res.source.onRecordIndexChanged = async function(source) {
        source.getFieldText("ID").then((id) => {
          setSelectedRecordID(id);
        });
      };
    });
  }, []);
  reactExports.useEffect(() => {
    if (selectedRecordID !== "0") {
      updCheckBoxStateByMask();
    }
  }, [selectedRecordID]);
  function canModify(flag, column, grid) {
    if (localCanModify(flag, grid)) {
      if (checkCurrentUserRights(ObjType.DayHourCfgCode, flag)) {
        if (flag === mfDelete) {
          return grid.source.getFieldValueSync("UserID") === grid.source.getFieldTextSync("ID");
        }
        return true;
      }
    }
    return false;
  }
  async function getImageIndex(grid) {
    if (grid == null ? void 0 : grid.source) {
      const userId = await grid.source.getFieldValue("UserID");
      if (!userId) return [3];
      if (userId !== await grid.source.getFieldText("ID")) return [2];
    }
  }
  async function onCheckBoxChange(e) {
    switch (e.currentTarget.value) {
      case "ShowInList": {
        await gridPanel.current.grid.postSomeData("ShowInList", {
          id: !e.target.checked ? "" : "1"
        });
        await gridPanel.current.grid.postExicstedEditRec(true);
        break;
      }
      case "MultiUsing": {
        await gridPanel.current.grid.postSomeData("MultiUsing", {
          id: !e.target.checked ? "" : "1"
        });
        await gridPanel.current.grid.postExicstedEditRec(true);
        break;
      }
      case "Summ": {
        break;
      }
      default: {
        let value = Number(e.currentTarget.value);
        const mask = Number(await gridPanel.current.grid.source.getFieldValue("Mask") || 0);
        value = e.target.checked ? mask - value : mask + value;
        await gridPanel.current.grid.postSomeData("Mask", {
          text: value ? mask : "",
          id: value
        });
        await gridPanel.current.grid.postExicstedEditRec(true);
      }
    }
    updCheckBoxStateByMask();
  }
  function updCheckBoxStateByMask() {
    gridPanel.current.grid.source.getFieldValue("Mask").then((mask) => {
      const showInList = gridPanel.current.grid.source.getFieldValueSync("ShowInList");
      const multiUsing = gridPanel.current.grid.source.getFieldValueSync("MultiUsing");
      setCheckboxes({
        Рабочие: mask & DayMask.Charging ? true : false,
        НеРабочие: mask & DayMask.Free ? true : false,
        Обычные: mask & DayMask.Normal ? true : false,
        Праздники: mask & DayMask.Feast ? true : false,
        Выходные: mask & DayMask.DayOff ? true : false,
        Короткие: mask & DayMask.Before ? true : false,
        Пн: mask & DayMask.Monday ? true : false,
        Вт: mask & DayMask.Tuesday ? true : false,
        Ср: mask & DayMask.Wednesday ? true : false,
        Чт: mask & DayMask.Thursday ? true : false,
        Пт: mask & DayMask.Friday ? true : false,
        Сб: mask & DayMask.Saturday ? true : false,
        Вс: mask & DayMask.Sunday ? true : false,
        Дневные: mask & HourMask.Day ? true : false,
        Ночные: mask & HourMask.Night ? true : false,
        Вечерние: mask & HourMask.Evening ? true : false,
        ВремяПоНорме: mask & DayMask.Whole ? true : false,
        МножОтрб: multiUsing === "1",
        ПоказОбщийСписок: showInList === "1"
      });
    });
    gridPanel.current.grid.source.getFieldText("IncludeLeaves").then((includeLeaves) => {
      setAbsenceText(includeLeaves);
    });
  }
  async function onSelect() {
    if (props.NewModalWindow) smetaModals.close(smetaModalId);
  }
  function getLeaveMask(listMask) {
    if (listMask > 0) return listMask;
    const sign = listMask === -32 || listMask === -64 ? -1 : 1;
    if (listMask === -32) return sign * Math.pow(2, Math.abs(listMask + 1));
    return sign * Math.pow(2, Math.abs(listMask + 33));
  }
  async function getAbsenceList() {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "tables").set("comand", "GetAbsenceList");
    const json = await AxiosRequest(true, params);
    const inclMask = {
      IncludeLeaves: await gridPanel.current.grid.source.getFieldValue("IncludeLeaves"),
      InclExtLeaves: await gridPanel.current.grid.source.getFieldValue("InclExtLeaves")
    }, exclMask = {
      ExcludeLeaves: await gridPanel.current.grid.source.getFieldValue("ExcludeLeaves"),
      ExclExtLeaves: await gridPanel.current.grid.source.getFieldValue("ExclExtLeaves")
    };
    return json.map((item) => {
      let listMask = Number(item.Mask);
      let checkState = emptyBox;
      if (!isNaN(listMask)) {
        listMask = getLeaveMask(listMask);
        let checkedMask;
        if (item.Mask > 0 || item.Mask == -32) {
          checkedMask = {
            inclMask: inclMask.IncludeLeaves,
            exclMask: exclMask.ExcludeLeaves
          };
        } else {
          checkedMask = {
            inclMask: inclMask.InclExtLeaves,
            exclMask: exclMask.ExclExtLeaves
          };
        }
        if (checkedMask.inclMask & listMask) {
          checkState = arrowBlue;
        } else if (checkedMask.exclMask & listMask) {
          checkState = arrowRed;
        }
      }
      return {
        label: item.Name,
        id: item.Mask,
        MultiCheckSet: "3073",
        checkState
      };
    });
  }
  async function clearListLeaves(ev) {
    if (ev.target.value === "6") {
      const currentGrid = gridPanel.current.grid;
      await currentGrid.postSomeData("IncludeLeaves", {
        id: "",
        text: ""
      });
      await currentGrid.postSomeData("InclExtLeaves", {
        id: "",
        text: ""
      });
      await currentGrid.postSomeData("ExcludeLeaves", {
        id: "",
        text: ""
      });
      await currentGrid.postSomeData("ExclExtLeaves", {
        id: "",
        text: ""
      });
      await currentGrid.postExicstedEditRec(true);
      setAbsenceText(await currentGrid.source.getFieldText("IncludeLeaves"));
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid,
    {
      id: "mainElement",
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "stretch",
      style: { height: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, style: { height: "calc(100% - 42px)", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid2,
          {
            container: true,
            direction: "row",
            sx: {
              justifyContent: "center",
              alignItems: "center",
              height: "100%"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid2, { size: 8, sx: { height: "100%", width: "65%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  id: `rcgrid_panel`,
                  style: {
                    height: "100%",
                    width: "100%",
                    position: "relative"
                  },
                  ref: gridPanel
                }
              ) }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid2, { size: 4, sx: { width: "35%", height: "100%" }, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  FormControlLabel,
                  {
                    disabled: !canModifyCheckBoxes,
                    sx: { marginLeft: "1px" },
                    control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Checkbox,
                      {
                        onChange: onCheckBoxChange,
                        name: "",
                        value: "Summ"
                      }
                    ),
                    label: "Суммировать по другим видам"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  FormControl,
                  {
                    disabled: !canModifyCheckBoxes,
                    style: styleFormControlBox,
                    sx: { m: 1, ".MuiFormGroup-root": { flexDirection: "row" } },
                    component: "fieldset",
                    variant: "standard",
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel, { component: "legend", children: "Режимы работы" }),
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, { children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Рабочие,
                                onChange: onCheckBoxChange,
                                name: "Рабочие",
                                value: DayMask.Charging
                              }
                            ),
                            label: "Рабочие"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.НеРабочие,
                                onChange: onCheckBoxChange,
                                name: "НеРабочие",
                                value: DayMask.Free
                              }
                            ),
                            label: "Не рабочие"
                          }
                        )
                      ] })
                    ]
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  FormControl,
                  {
                    disabled: !canModifyCheckBoxes,
                    style: styleFormControlBox,
                    sx: { m: 1, ".MuiFormGroup-root": { flexDirection: "row" } },
                    component: "fieldset",
                    variant: "standard",
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel, { component: "legend", children: "Типы дней" }),
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, { children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Обычные,
                                onChange: onCheckBoxChange,
                                name: "Обычные",
                                value: DayMask.Normal
                              }
                            ),
                            label: "Обычные"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Праздники,
                                onChange: onCheckBoxChange,
                                name: "Праздники",
                                value: DayMask.Feast
                              }
                            ),
                            label: "Праздники"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Выходные,
                                onChange: onCheckBoxChange,
                                name: "Выходные",
                                value: DayMask.DayOff
                              }
                            ),
                            label: "Выходные"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Короткие,
                                onChange: onCheckBoxChange,
                                name: "Короткие",
                                value: DayMask.Before
                              }
                            ),
                            label: "Короткие"
                          }
                        )
                      ] })
                    ]
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  FormControl,
                  {
                    disabled: !canModifyCheckBoxes,
                    style: styleFormControlBox,
                    sx: { m: 1, ".MuiFormGroup-root": { flexDirection: "row" } },
                    component: "fieldset",
                    variant: "standard",
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel, { component: "legend", children: "Дни недели" }),
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, { children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { checked: checkboxes.Пн, onChange: onCheckBoxChange, name: "Пн", value: DayMask.Monday }),
                            label: "пн."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { checked: checkboxes.Вт, onChange: onCheckBoxChange, name: "Вт", value: DayMask.Tuesday }),
                            label: "вт."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Ср,
                                onChange: onCheckBoxChange,
                                name: "Ср",
                                value: DayMask.Wednesday
                              }
                            ),
                            label: "ср."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Чт,
                                onChange: onCheckBoxChange,
                                name: "Чт",
                                value: DayMask.Thursday
                              }
                            ),
                            label: "чт."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { checked: checkboxes.Пт, onChange: onCheckBoxChange, name: "Пт", value: DayMask.Friday }),
                            label: "пт."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Сб,
                                onChange: onCheckBoxChange,
                                name: "Сб",
                                value: DayMask.Saturday
                              }
                            ),
                            label: "сб."
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { checked: checkboxes.Вс, onChange: onCheckBoxChange, name: "Вс", value: DayMask.Sunday }),
                            label: "вс."
                          }
                        )
                      ] })
                    ]
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  FormControl,
                  {
                    disabled: !canModifyCheckBoxes,
                    style: styleFormControlBox,
                    sx: { m: 1, ".MuiFormGroup-root": { flexDirection: "row" } },
                    component: "fieldset",
                    variant: "standard",
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel, { component: "legend", children: "Типы часов" }),
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, { children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Дневные,
                                onChange: onCheckBoxChange,
                                name: "Дневные",
                                value: HourMask.Day
                              }
                            ),
                            label: "Дневные"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Ночные,
                                onChange: onCheckBoxChange,
                                name: "Ночные",
                                value: HourMask.Night
                              }
                            ),
                            label: "Ночные"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          FormControlLabel,
                          {
                            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Checkbox,
                              {
                                checked: checkboxes.Вечерние,
                                onChange: onCheckBoxChange,
                                name: "Вечерние",
                                value: HourMask.Evening
                              }
                            ),
                            label: "Вечерние"
                          }
                        )
                      ] })
                    ]
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  Grid2,
                  {
                    container: true,
                    direction: "row",
                    sx: {
                      alignItems: "center",
                      marginLeft: "10px"
                    },
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        "div",
                        {
                          style: {
                            width: "200px",
                            height: "27px",
                            border: "1px solid"
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Editor,
                            {
                              disabled: !canModifyCheckBoxes,
                              value: absenceText,
                              getItems: getAbsenceList,
                              editStyle: "customCheckList",
                              onEditCustomCheckList: async (data) => {
                                const includeBitOn = data.CheckState === arrowBlue, excludeBitOn = data.CheckState === arrowRed;
                                let listMask = Number(data.id);
                                if (!isNaN(listMask)) {
                                  if (data.id > 0 || data.id == -32) {
                                    listMask = { Mask1: getLeaveMask(listMask) };
                                  } else listMask = { Mask2: getLeaveMask(listMask) };
                                  const source = gridPanel.current.grid.source;
                                  const inclMask = {
                                    IncludeLeaves: await source.getFieldValue("IncludeLeaves"),
                                    InclExtLeaves: await source.getFieldValue("InclExtLeaves")
                                  }, exclMask = {
                                    ExcludeLeaves: await source.getFieldValue("ExcludeLeaves"),
                                    ExclExtLeaves: await source.getFieldValue("ExclExtLeaves")
                                  };
                                  if (includeBitOn) {
                                    inclMask.IncludeLeaves = inclMask.IncludeLeaves | listMask.Mask1;
                                    inclMask.InclExtLeaves = inclMask.InclExtLeaves | listMask.Mask2;
                                  } else {
                                    inclMask.IncludeLeaves = inclMask.IncludeLeaves & ~listMask.Mask1;
                                    inclMask.InclExtLeaves = inclMask.InclExtLeaves & ~listMask.Mask2;
                                  }
                                  if (excludeBitOn) {
                                    exclMask.ExcludeLeaves = exclMask.ExcludeLeaves | listMask.Mask1;
                                    exclMask.ExclExtLeaves = exclMask.ExclExtLeaves | listMask.Mask2;
                                  } else {
                                    exclMask.ExcludeLeaves = exclMask.ExcludeLeaves & ~listMask.Mask1;
                                    exclMask.ExclExtLeaves = exclMask.ExclExtLeaves & ~listMask.Mask2;
                                  }
                                  await gridPanel.current.grid.postSomeData("IncludeLeaves", {
                                    id: inclMask.IncludeLeaves || ""
                                  });
                                  await gridPanel.current.grid.postSomeData("InclExtLeaves", {
                                    id: inclMask.InclExtLeaves || ""
                                  });
                                  await gridPanel.current.grid.postSomeData("ExcludeLeaves", {
                                    id: exclMask.ExcludeLeaves || ""
                                  });
                                  await gridPanel.current.grid.postSomeData("ExclExtLeaves", {
                                    id: exclMask.ExclExtLeaves || ""
                                  });
                                  await gridPanel.current.grid.postExicstedEditRec(true);
                                  setAbsenceText(await source.getFieldText("IncludeLeaves"));
                                }
                              }
                            }
                          )
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        IconButton,
                        {
                          disabled: !canModifyCheckBoxes,
                          title: "Очистить список отвлечений",
                          onClick: () => {
                            renderMessageBox({
                              dlgType: DlgType.Confirmation,
                              buttons: Button.Yes + Button.No,
                              message: "Очистить список настроенных для вида времени отвлечений?",
                              selectF: clearListLeaves
                            });
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon, { size: "small" })
                        }
                      )
                    ]
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  FormControl,
                  {
                    sx: { m: 1 },
                    component: "fieldset",
                    variant: "standard",
                    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormGroup, { children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        FormControlLabel,
                        {
                          disabled: !canModifyCheckBoxes,
                          control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Checkbox,
                            {
                              checked: checkboxes.ВремяПоНорме,
                              onChange: onCheckBoxChange,
                              name: "ВремяПоНорме",
                              value: DayMask.Whole
                            }
                          ),
                          label: "Учитывать время по норме"
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        FormControlLabel,
                        {
                          disabled: !canModifyCheckBoxes,
                          control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Checkbox,
                            {
                              checked: checkboxes.МножОтрб,
                              onChange: onCheckBoxChange,
                              name: "МножОтрб",
                              value: "MultiUsing"
                            }
                          ),
                          label: "Множественная отработка"
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        FormControlLabel,
                        {
                          disabled: !canModifyCheckBoxes,
                          control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Checkbox,
                            {
                              checked: checkboxes.ПоказОбщийСписок,
                              onChange: onCheckBoxChange,
                              name: "ПоказОбщийСписок",
                              value: "ShowInList"
                            }
                          ),
                          label: "Показывать в общем списке"
                        }
                      )
                    ] })
                  }
                )
              ] })
            ]
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid,
          {
            container: true,
            item: true,
            direction: "row",
            justifyContent: "flex-end",
            alignItems: "center",
            style: {
              height: "42px",
              width: "100%",
              border: "1px solid #C8B58F",
              display: props.hiddenFutter ? "none" : ""
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, style: { width: "fit-content", marginRight: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid,
              {
                container: true,
                item: true,
                direction: "row",
                justifyContent: "flex-end",
                alignItems: "center",
                style: { height: "100%", width: "100%" },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Button$1,
                    {
                      onClick: onSelect,
                      size: "small",
                      variant: "outlined",
                      style: {
                        textTransform: "none",
                        marginRight: "10px",
                        display: props.Buttons && (props.Buttons & 1) === 0 ? "none" : ""
                      },
                      value: "1",
                      className: "button_Modal_Select",
                      children: "Выбрать"
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Button$1,
                    {
                      size: "small",
                      variant: "outlined",
                      style: { textTransform: "none" },
                      value: "2",
                      className: "button_Modal_Close",
                      onClick: () => {
                        if (props.NewModalWindow) smetaModals.close(smetaModalId);
                      },
                      children: "Закрыть"
                    }
                  )
                ]
              }
            ) })
          }
        )
      ]
    }
  ) });
}
export {
  DialogTypeOfWorkTime as default
};
//# sourceMappingURL=DialogTypeOfWorkTime-WqGwCLth.js.map
