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

const options = [{
  value: "prob6",
  label: "Energy source failure"
}];

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

  return (
    <div>
      <Title text={"Energy source parameter"} />

      <TreeSelect
        mode="tags"
        style={{
          width: "100%",
        }}
        placeholder="Select parameter"
        onChange={(key) => setSourceFilter(key)}
        treeData={options}
        allowClear={true}
        value={source_filter?.key}
        disabled={disabled}
        treeDefaultExpandAll
      />
    </div>
  );
};
