import { bv as EditStyle, b2 as defaultFieldInfo, r as reactExports, a6 as GridLoader, ag as handleTable, j as jsxRuntimeExports, ax as SplitterLocal, ai as Editor, _ as TextField, I as IconButton, dk as ClearIcon, a3 as Tree, aU as ContextMenu, aV as getDefaultMenu, F as FormControl, bE as RadioGroup, i as FormControlLabel, bF as Radio, ah as AxiosRequest, ac as tokenProcessingTest, ap as smetaModals, dl as DialogParams, ar as getStyleWindow, bg as smetaAxios, bf as Prefixes, bM as SectionToolsJS } from "./index-D15x63tD.js";
const fullWidthContainer = "_fullWidthContainer_11b7c_1";
const sectionContainer = "_sectionContainer_11b7c_9";
const sectionToolsContainer = "_sectionToolsContainer_11b7c_21";
const sectionMainBlock = "_sectionMainBlock_11b7c_29";
const fullBorder = "_fullBorder_11b7c_43";
const treeMainContainer = "_treeMainContainer_11b7c_49";
const treeInputContainer = "_treeInputContainer_11b7c_61";
const treeInputTitle = "_treeInputTitle_11b7c_71";
const treeInput = "_treeInput_11b7c_61";
const treeContainer = "_treeContainer_11b7c_95";
const normativeContainer = "_normativeContainer_11b7c_107";
const normativeTitle = "_normativeTitle_11b7c_119";
const normativeInputsConteiner = "_normativeInputsConteiner_11b7c_135";
const normativeInput = "_normativeInput_11b7c_135";
const normativeLabelInput = "_normativeLabelInput_11b7c_163";
const normativeRadio = "_normativeRadio_11b7c_179";
const styleSection = {
  fullWidthContainer,
  sectionContainer,
  sectionToolsContainer,
  sectionMainBlock,
  fullBorder,
  treeMainContainer,
  treeInputContainer,
  treeInputTitle,
  treeInput,
  treeContainer,
  normativeContainer,
  normativeTitle,
  normativeInputsConteiner,
  normativeInput,
  normativeLabelInput,
  normativeRadio
};
const widthColDay = 30;
const getNormColumns = () => {
  return {
    title: [
      {
        fieldName: "Month",
        title: "Месяц",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: EditStyle.ReadOnly
        }
      },
      {
        fieldName: "Day1",
        title: "1",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day2",
        title: "2",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day3",
        title: "3",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day4",
        title: "4",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day5",
        title: "5",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day6",
        title: "6",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day7",
        title: "7",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day8",
        title: "8",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day9",
        title: "9",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day10",
        title: "10",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day11",
        title: "11",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day12",
        title: "12",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day13",
        title: "13",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day14",
        title: "14",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day15",
        title: "15",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day16",
        title: "16",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day17",
        title: "17",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day18",
        title: "18",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day19",
        title: "19",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day20",
        title: "20",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day21",
        title: "21",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day22",
        title: "22",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day23",
        title: "23",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day24",
        title: "24",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day25",
        title: "25",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day26",
        title: "26",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day27",
        title: "27",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day28",
        title: "28",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day29",
        title: "29",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day30",
        title: "30",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day31",
        title: "31",
        width: widthColDay,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Day32",
        title: "Итого",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: EditStyle.ReadOnly
        }
      }
    ]
  };
};
const getDefaultNormFields = () => {
  return [
    {
      Name: "Month",
      Title: "Месяц",
      Width: "7"
    },
    {
      Name: "Day1",
      Title: "1",
      Width: "7"
    },
    {
      Name: "Day2",
      Title: "2",
      Width: "7"
    },
    {
      Name: "Day3",
      Title: "3",
      Width: "7"
    },
    {
      Name: "Day4",
      Title: "4",
      Width: "7"
    },
    {
      Name: "Day5",
      Title: "5",
      Width: "7"
    },
    {
      Name: "Day6",
      Title: "6",
      Width: "7"
    },
    {
      Name: "Day7",
      Title: "7",
      Width: "7"
    },
    {
      Name: "Day8",
      Title: "8",
      Width: "7"
    },
    {
      Name: "Day9",
      Title: "9",
      Width: "7"
    },
    {
      Name: "Day10",
      Title: "10",
      Width: "7"
    },
    {
      Name: "Day11",
      Title: "11",
      Width: "7"
    },
    {
      Name: "Day12",
      Title: "12",
      Width: "7"
    },
    {
      Name: "Day13",
      Title: "13",
      Width: "7"
    },
    {
      Name: "Day14",
      Title: "14",
      Width: "7"
    },
    {
      Name: "Day15",
      Title: "15",
      Width: "7"
    },
    {
      Name: "Day16",
      Title: "16",
      Width: "7"
    },
    {
      Name: "Day17",
      Title: "17",
      Width: "7"
    },
    {
      Name: "Day18",
      Title: "18",
      Width: "7"
    },
    {
      Name: "Day19",
      Title: "19",
      Width: "7"
    },
    {
      Name: "Day20",
      Title: "20",
      Width: "7"
    },
    {
      Name: "Day21",
      Title: "21",
      Width: "7"
    },
    {
      Name: "Day22",
      Title: "22",
      Width: "7"
    },
    {
      Name: "Day23",
      Title: "23",
      Width: "7"
    },
    {
      Name: "Day24",
      Title: "24",
      Width: "7"
    },
    {
      Name: "Day25",
      Title: "25",
      Width: "7"
    },
    {
      Name: "Day26",
      Title: "26",
      Width: "7"
    },
    {
      Name: "Day27",
      Title: "27",
      Width: "7"
    },
    {
      Name: "Day28",
      Title: "28",
      Width: "7"
    },
    {
      Name: "Day29",
      Title: "29",
      Width: "7"
    },
    {
      Name: "Day30",
      Title: "30",
      Width: "7"
    },
    {
      Name: "Day31",
      Title: "31",
      Width: "7"
    },
    {
      Name: "Day32",
      Title: "31",
      Width: "7"
    }
  ];
};
const getWorkModeParams = (data) => {
  const params = {
    Mode: data.groupId
  };
  const config = {
    prefix: data.module,
    method: "GET",
    url: "GetWorkModeParams",
    params
  };
  return smetaAxios(config);
};
const getObjectValues = async (data) => {
  const params = {
    ObjType: data.datatype
  };
  const config = {
    prefix: data.module,
    method: "GET",
    url: "GetObjectValues",
    params
  };
  return smetaAxios(config);
};
const setParamObjectText = async (data) => {
  const params = {
    Module: data.Module,
    ObjType: data.ObjType,
    ObjRef: data.ObjRef,
    Text: data.Value,
    Flag: "0"
  };
  const config = {
    prefix: Prefixes.progs,
    method: "GET",
    url: "SetParamObjectText",
    params
  };
  const json = await smetaAxios(config);
  if (json.EditVal && !json.Value) json.Value = json.EditVal;
  return { Values: [json] };
};
const getParamObjectText = async (data) => {
  const params = {
    Module: data.Module,
    ObjType: data.ObjType,
    ObjRef: data.ObjRef,
    Flag: "0"
  };
  const config = {
    prefix: Prefixes.progs,
    method: "GET",
    url: "GetParamObjectText",
    params
  };
  const json = await smetaAxios(config);
  if (json.EditVal && !json.Value) json.Value = json.EditVal;
  return { Values: [json] };
};
const setWorkModeValues = (data, postData = {}) => {
  const params = {
    Mode: data.groupId
  };
  const config = {
    prefix: data.module,
    method: "POST",
    url: "SetWorkModeValues",
    params,
    data: postData
  };
  return smetaAxios(config);
};
const getNormValues = async (data) => {
  const params = /* @__PURE__ */ new Map([
    ["prefix", data.module],
    ["comand", "GetNormValues"],
    ["Mode", data.mode],
    ["Year", data.year],
    ["Type", data.type],
    ["Mask", data.mask]
  ]);
  return AxiosRequest(true, params);
};
const changeWorkModeNorm = async (data) => {
  const params = /* @__PURE__ */ new Map([
    ["prefix", data.module],
    ["comand", "ChangeWorkModeNorm"],
    ["Year", data.year],
    ["Month", data.month],
    ["Mode", data.mode],
    [data.keyname, data.value],
    ["Days", data.day]
  ]);
  return AxiosRequest(true, params);
};
const getMonth = (index) => {
  const months = [
    "январь",
    "февраль",
    "март",
    "апрель",
    "май",
    "июнь",
    "июль",
    "август",
    "сентябрь",
    "октябрь",
    "ноябрь",
    "декабрь"
  ];
  return months[index] || "";
};
function WorkTimeMainTable({ props }) {
  const gridPanel = reactExports.useRef(null);
  const gridPanelLocal = reactExports.useRef(null);
  const records = reactExports.useRef([]);
  const treeRef = reactExports.useRef(null);
  const [mainGrid, setMainGrid] = reactExports.useState();
  const [localGrid, setlocalGrid] = reactExports.useState();
  const [groupID, setGroupID] = reactExports.useState("0");
  const [rValue, setRValue] = reactExports.useState("1");
  const [yearValue, setYearValue] = reactExports.useState(`${(/* @__PURE__ */ new Date()).getFullYear()}`);
  const [info, setInfo] = reactExports.useState("0");
  const [departValue, setDepartValue] = reactExports.useState({ label: "Все учреждения", id: "0" });
  const [searchValue, setSearchValue] = reactExports.useState("");
  reactExports.useEffect(() => {
    loadGrid();
    loadLocalGrid();
  }, []);
  reactExports.useEffect(() => {
    refreshGridDepTree();
    getLocalRecords();
  }, [groupID]);
  reactExports.useEffect(() => {
    getLocalRecords();
  }, [rValue, yearValue]);
  reactExports.useEffect(() => {
    applySearch();
  }, [searchValue]);
  const loadGrid = async () => {
    setMainGrid(await GridLoader(gridPanel.current, { ...props, GroupID: groupID }));
  };
  const loadLocalGrid = async () => {
    if (localGrid) return;
    await getLocalRecords();
    const res = await GridLoader(gridPanelLocal.current, props, {
      localGrid: true,
      refresh: false,
      Columns: getNormColumns(),
      defaultFields: getDefaultNormFields(),
      keyField: "ID",
      recordKeys: [
        "ID",
        "Month",
        "Day1",
        "Day2",
        "Day3",
        "Day4",
        "Day5",
        "Day6",
        "Day7",
        "Day8",
        "Day9",
        "Day10",
        "Day11",
        "Day12",
        "Day13",
        "Day14",
        "Day15",
        "Day16",
        "Day17",
        "Day18",
        "Day19",
        "Day20",
        "Day21",
        "Day22",
        "Day23",
        "Day24",
        "Day25",
        "Day26",
        "Day27",
        "Day28",
        "Day29",
        "Day30",
        "Day31",
        "Day32"
      ],
      titleKey: "Text",
      getFieldText,
      // checkFieldText: checkFieldText,
      onPostRecord,
      // createRecord: createRecord,
      // deleteRecord: deleteRecord,
      getRecords: () => records.current,
      Rights: "-1"
    });
    if (res) {
      res.grid.canModify = canLoaclModify;
    }
    setlocalGrid(res);
  };
  const getFieldText = (request) => {
    const recVal = records.current[request.RecordIndex];
    return recVal[request.FieldName];
  };
  const canLoaclModify = (modifyFlag, column, me) => {
    if (column.fieldName === "Month" || column.fieldName === "Day32") return false;
    if (groupID === "0") return false;
    if (rValue !== "2") return false;
    return true;
  };
  const onPostRecord = async (request) => {
    const key = request.RecordSet.Attributes[0];
    const value = request.RecordSet.Records.Record.$Data[0].text;
    const cell = records.current[request.RecordIndex][key];
    cell.text = value;
    cell.Text = value;
    await changeWorkModeNorm({
      mode: groupID,
      module: props.Module,
      year: yearValue,
      day: cell.Number,
      keyname: key,
      month: `${request.RecordIndex + 1}`,
      value
    });
  };
  const refreshGridDepTree = async (index) => {
    if (!mainGrid) return;
    mainGrid.source.onHandleRequest = handleTable({
      Module: props.Module,
      ObjType: props.ObjType,
      GroupID: groupID,
      selectedRecordID: "0",
      SectionID: props.SectionID
    });
    mainGrid.source.first();
    await mainGrid.grid.setSource(mainGrid.source);
    await mainGrid.grid.refreshSource(index);
    await mainGrid.grid.updateGridSize();
  };
  const getLocalRecords = async () => {
    const json = await getNormValues({ mode: groupID, module: props.Module, year: yearValue, type: rValue, mask: "7" });
    records.current = Object.values(json).reduce((result, item, index) => {
      const newItem = {};
      newItem.Month = getMonth(index);
      Object.entries(item).forEach(([key, value]) => {
        if (typeof value === "object") {
          newItem[key] = { ...value, text: value.Text || "", id: value.Number };
        }
      });
      result.push(newItem);
      return result;
    }, []);
    if (localGrid) {
      localGrid.grid.canModify = canLoaclModify;
      await localGrid.grid.refreshSource();
    }
  };
  const onDropDownList = async () => {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "departments").set("comand", "GetObjectValues").set("ObjType", "2773").set("ObjRef", "0");
    const json = await AxiosRequest(true, params);
    const result = [{ label: "Все учреждения", id: "0" }];
    if (json && json.Items) {
      json.Items.forEach((item, index) => {
        if (typeof item === "object") {
          result.push({ label: item.text, id: item.id });
        } else {
          result.push({ label: item, id: `${index + 1}` });
        }
      });
    }
    return result;
  };
  const onEditDepartment = (data) => {
    setInfo(data.tag);
    setDepartValue({ label: data.value, id: data.tag });
    if (!treeRef.current) return;
    treeRef.current.refreshTree(groupID, { Info: data.tag });
  };
  const onEditYear = (data) => {
    setYearValue(data.value);
  };
  const onEditButtonClick = (data) => {
    if (data.json) tokenProcessingTest(data.json, data.subData);
  };
  const onSearchFieldValueChange = (event) => {
    setSearchValue(() => event.target.value);
  };
  const onSearchClearClick = () => {
    setSearchValue("");
  };
  const applySearch = () => {
    if (!treeRef.current) return;
    const listItems = Array.from(treeRef.current.children);
    listItems.forEach((li) => {
      const text = li.innerText.toLowerCase();
      const shouldShow = text.includes(searchValue.toLowerCase());
      li.style.display = shouldShow ? "" : "none";
    });
  };
  const onClickTreeParams = async (data) => {
    const paramsData = await getWorkModeParams(data);
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogParams,
        {
          props: {
            data: paramsData,
            Module: data.module,
            reqCommand: "GetWorkModeParams",
            GroupID: data.groupId,
            onSelect: (postData) => {
              setWorkModeValues(data, postData);
            },
            onDropDownList: getObjectValues,
            onSetParam: setParamObjectText,
            onEditList: getParamObjectText,
            NoTitle: true,
            NoHistory: true
          }
        }
      ),
      {
        Title: "Параметры графика работы",
        style: getStyleWindow("params"),
        hiddenButton: true
      }
    );
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styleSection.fullWidthContainer} ${styleSection.fullBorder}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    SplitterLocal,
    {
      orientation: "vertical",
      style: {
        width: "100%",
        height: "100%"
      },
      primaryIndex: 0,
      transitionDuration: 250,
      sizeSecondary: "70%",
      hideButtons: true,
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.fullWidthContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.treeMainContainer, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.treeInputContainer, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.treeInputTitle, children: "Настройка графиков" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.treeInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Editor,
              {
                readonly: true,
                editStyle: "17",
                placeholder: "Учреждение",
                onDropDownList,
                onEdit: onEditDepartment,
                onEditButtonClick,
                datatype: "2773",
                type: "departments",
                value: departValue.label,
                objref: departValue.id
              }
            ) })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.normativeInputsConteiner, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeLabelInput, children: "Поиск: " }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              TextField,
              {
                fullWidth: true,
                value: searchValue,
                onChange: onSearchFieldValueChange,
                sx: {
                  "& .MuiOutlinedInput-root": {
                    height: "30px",
                    "& input": {
                      padding: "6px 20px",
                      height: "auto"
                    },
                    "& .MuiOutlinedInput-notchedOutline": {
                      border: "none"
                    }
                  }
                }
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onSearchClearClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon, { sx: { fontSize: "15px" } }) })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.treeContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Tree,
            {
              props: {
                ref: treeRef,
                multiCheck: false,
                ObjType: props.ObjType,
                SectionID: props.SectionID,
                Module: props.Module,
                Current: groupID,
                ObjRef: groupID,
                selectID: setGroupID,
                UsedDate: "0",
                Info: info,
                Internal: "0",
                defaultMenu: ["add", "del", "params"],
                paramsCustomClick: onClickTreeParams,
                noExpandFirst: true
              }
            }
          ) })
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.fullWidthContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          SplitterLocal,
          {
            style: {
              width: "100%",
              height: "100%"
            },
            primaryIndex: 0,
            transitionDuration: 250,
            sizeSecondary: "30%",
            hideButtons: true,
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.fullWidthContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                ContextMenu,
                {
                  for: "schedule",
                  Menu: getDefaultMenu("schedule"),
                  refs: { current: mainGrid == null ? void 0 : mainGrid.grid },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "div",
                    {
                      id: `rcgrid_panel`,
                      ref: gridPanel,
                      style: {
                        height: "100%",
                        width: "100%",
                        position: "relative"
                      }
                    }
                  )
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.fullWidthContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.sectionContainer, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeTitle, children: "Норма времени" }),
                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.normativeInputsConteiner, children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeLabelInput, children: "Год:" }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeInput, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { value: yearValue, editStyle: "8", onEdit: onEditYear }) }) }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeRadio, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    RadioGroup,
                    {
                      value: rValue,
                      onChange: (event) => {
                        setRValue(event.target.value);
                      },
                      row: true,
                      "aria-labelledby": "demo-row-radio-buttons-group-label",
                      name: "row-radio-buttons-group",
                      children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: "1", control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Дни" }),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: "2", control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Часы" }),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: "4", control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Выработка" })
                      ]
                    }
                  ) }) })
                ] }),
                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.normativeContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "div",
                  {
                    id: `rcgrid_panel`,
                    ref: gridPanelLocal,
                    style: {
                      height: "100%",
                      width: "100%",
                      position: "relative"
                    }
                  }
                ) })
              ] }) })
            ]
          }
        ) })
      ]
    }
  ) });
}
function SectionWorkTime({ sectionData, SectionID }) {
  const props = {
    // height: "100%",
    ObjType: "2004",
    CLSID: sectionData.CLSID,
    Module: "schedule",
    SectionID: SectionID || sectionData.ID
    // hiddenFutter: true,
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.fullWidthContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styleSection.sectionContainer, children: [
    props.SectionID && Number(props.SectionID) > 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.sectionToolsContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SectionToolsJS, { ID: props.SectionID }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styleSection.sectionMainBlock, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WorkTimeMainTable, { props }) })
  ] }) });
}
export {
  SectionWorkTime as default
};
//# sourceMappingURL=SectionWorkTime-B9Vc40Xf.js.map
