import { Pressable, Switch, Text, View } from 'react-native' import type { WorkspaceCreateSetupDecision } from '../tasks/workspace-create-params' import { colors } from '../theme/mobile-theme' import { newWorktreeFormStyles as styles } from './new-worktree-form-styles' import type { SetupRunPolicy } from './new-worktree-modal-types' export function NewWorkspaceSetupScriptField({ command, source, runPolicy, decision, runSetup, onDecisionChange, onRunSetupChange }: { command: string source: string | null runPolicy: SetupRunPolicy decision: Exclude | null runSetup: boolean onDecisionChange: (decision: Exclude) => void onRunSetupChange: (run: boolean) => void }) { return ( Setup script {source ? ( {source === 'orca.yaml' ? 'ORCA.YAML' : 'HOOKS'} ) : null} {runPolicy === 'ask' ? ( onDecisionChange('run')} > Run onDecisionChange('skip')} > Skip ) : ( Run setup command )} {command} ) }