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

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

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

  return (
    <div>
      <Title text={"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>
  );
};
