import { c as _c } from "react/compiler-runtime";
import React from 'react';
import { Box, Text } from '../../ink.js';
import type { Workflow } from './types.js';
interface CreatingStepProps {
  currentWorkflowInstallStep: number;
  secretExists: boolean;
  useExistingSecret: boolean;
  secretName: string;
  skipWorkflow?: boolean;
  selectedWorkflows: Workflow[];
}
export function CreatingStep(t0) {
  const $ = _c(10);
  const {
    currentWorkflowInstallStep,
    secretExists,
    useExistingSecret,
    secretName,
    skipWorkflow: t1,
    selectedWorkflows
  } = t0;
  const skipWorkflow = t1 === undefined ? false : t1;
  let t2;
  if ($[0] !== secretExists || $[1] !== secretName || $[2] !== selectedWorkflows || $[3] !== skipWorkflow || $[4] !== useExistingSecret) {
    t2 = skipWorkflow ? ["Getting repository information", secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`] : ["Getting repository information", "Creating branch", selectedWorkflows.length > 1 ? "Creating workflow files" : "Creating workflow file", secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`, "Opening pull request page"];
    $[0] = secretExists;
    $[1] = secretName;
    $[2] = selectedWorkflows;
    $[3] = skipWorkflow;
    $[4] = useExistingSecret;
    $[5] = t2;
  } else {
    t2 = $[5];
  }
  const progressSteps = t2;
  let t3;
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
    t3 = <Box flexDirection="column" marginBottom={1}><Text bold={true}>Install GitHub App</Text><Text dimColor={true}>Create GitHub Actions workflow</Text></Box>;
    $[6] = t3;
  } else {
    t3 = $[6];
  }
  let t4;
  if ($[7] !== currentWorkflowInstallStep || $[8] !== progressSteps) {
    t4 = <><Box flexDirection="column" borderStyle="round" paddingX={1}>{t3}{progressSteps.map((stepText, index) => {
          let status = "pending";
          if (index < currentWorkflowInstallStep) {
            status = "completed";
          } else {
            if (index === currentWorkflowInstallStep) {
              status = "in-progress";
            }
          }
          return <Box key={index}><Text color={status === "completed" ? "success" : status === "in-progress" ? "warning" : undefined}>{status === "completed" ? "\u2713 " : ""}{stepText}{status === "in-progress" ? "\u2026" : ""}</Text></Box>;
        })}</Box></>;
    $[7] = currentWorkflowInstallStep;
    $[8] = progressSteps;
    $[9] = t4;
  } else {
    t4 = $[9];
  }
  return t4;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJSZWFjdCIsIkJveCIsIlRleHQiLCJXb3JrZmxvdyIsIkNyZWF0aW5nU3RlcFByb3BzIiwiY3VycmVudFdvcmtmbG93SW5zdGFsbFN0ZXAiLCJzZWNyZXRFeGlzdHMiLCJ1c2VFeGlzdGluZ1NlY3JldCIsInNlY3JldE5hbWUiLCJza2lwV29ya2Zsb3ciLCJzZWxlY3RlZFdvcmtmbG93cyIsIkNyZWF0aW5nU3RlcCIsInQwIiwiJCIsIl9jIiwidDEiLCJ1bmRlZmluZWQiLCJ0MiIsImxlbmd0aCIsInByb2dyZXNzU3RlcHMiLCJ0MyIsIlN5bWJvbCIsImZvciIsInQ0IiwibWFwIiwic3RlcFRleHQiLCJpbmRleCIsInN0YXR1cyJdLCJzb3VyY2VzIjpbIkNyZWF0aW5nU3RlcC50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgQm94LCBUZXh0IH0gZnJvbSAnLi4vLi4vaW5rLmpzJ1xuaW1wb3J0IHR5cGUgeyBXb3JrZmxvdyB9IGZyb20gJy4vdHlwZXMuanMnXG5cbmludGVyZmFjZSBDcmVhdGluZ1N0ZXBQcm9wcyB7XG4gIGN1cnJlbnRXb3JrZmxvd0luc3RhbGxTdGVwOiBudW1iZXJcbiAgc2VjcmV0RXhpc3RzOiBib29sZWFuXG4gIHVzZUV4aXN0aW5nU2VjcmV0OiBib29sZWFuXG4gIHNlY3JldE5hbWU6IHN0cmluZ1xuICBza2lwV29ya2Zsb3c/OiBib29sZWFuXG4gIHNlbGVjdGVkV29ya2Zsb3dzOiBXb3JrZmxvd1tdXG59XG5cbmV4cG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PD5cbiAgICAgIDxCb3ggZmxleERpcmVjdGlvbj1cImNvbHVtblwiIGJvcmRlclN0eWxlPVwicm91bmRcIiBwYWRkaW5nWD17MX0+XG4gICAgICAgIDxCb3ggZmxleERpcmVjdGlvbj1cImNvbHVtblwiIG1hcmdpbkJvdHRvbT17MX0+XG4gICAgICAgICAgPFRleHQgYm9sZD5JbnN0YWxsIEdpdEh1YiBBcHA8L1RleHQ+XG4gICAgICAgICAgPFRleHQgZGltQ29sb3I+Q3JlYXRlIEdpdEh1YiBBY3Rpb25zIHdvcmtmbG93PC9UZXh0PlxuICAgICAgICA8L0JveD5cbiAgICAgICAge3Byb2dyZXNzU3RlcHMubWFwKChzdGVwVGV4dCwgaW5kZXgpID0+IHtcbiAgICAgICAgICBsZXQgc3RhdHVzOiAnY29tcGxldGVkJyB8ICdpbi1wcm9ncmVzcycgfCAncGVuZGluZycgPSAncGVuZGluZydcblxuICAgICAgICAgIGlmIChpbmRleCA8IGN1cnJlbnRXb3JrZmxvd0luc3RhbGxTdGVwKSB7XG4gICAgICAgICAgICBzdGF0dXMgPSAnY29tcGxldGVkJ1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5kZXggPT09IGN1cnJlbnRXb3JrZmxvd0luc3RhbGxTdGVwKSB7XG4gICAgICAgICAgICBzdGF0dXMgPSAnaW4tcHJvZ3Jlc3MnXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxCb3gga2V5PXtpbmRleH0+XG4gICAgICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICAgICAgY29sb3I9e1xuICAgICAgICAgICAgICAgICAgc3RhdHVzID09PSAnY29tcGxldGVkJ1xuICAgICAgICAgICAgICAgICAgICA/ICdzdWNjZXNzJ1xuICAgICAgICAgICAgICAgICAgICA6IHN0YXR1cyA9PT0gJ2luLXByb2dyZXNzJ1xuICAgICAgICAgICAgICAgICAgICAgID8gJ3dhcm5pbmcnXG4gICAgICAgICAgICAgICA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