import { createStepUI } from "../utils/stepui.js";
import { steps } from "./config.js";
import { hasGltfFile } from "./gltf.js";

function getFilteredSteps() {
  const hasGltf = hasGltfFile();
  return steps.map(step => {
    if (step.name === "输出选项") {
      return { ...step, options: step.options.filter(opt => !opt.dynamic || hasGltf) };
    }
    return step;
  });
}

const ui = createStepUI({
  title: "KTX2 纹理压缩工具",
  getSteps: getFilteredSteps
});

export const { runInteractive, showSummary } = ui;
