import { TreeSelect } from "antd";
import { Title } from "../../components/Title.jsx";
import { useDzkhFilters } from "../../stores/useDzkhFilters.js";

const options = [{
  value: "prob6",
  label: "Авария на ТП"
}];

export const SourceParameterSelect = ({ disabled }) => {
  const {
    source_filter,
    setSourceFilter,
  } = useDzkhFilters();

  return (
    <div>
      <Title text={"Показатель источника"} />

      <TreeSelect
        mode="tags"
        style={{
          width: "100%",
        }}
        placeholder="Выберите показатель"
        onChange={(key) => setSourceFilter(key)}
        treeData={options}
        allowClear={true}
        value={source_filter?.key}
        disabled={disabled}
        treeDefaultExpandAll
      />
    </div>
  );
};
