import { Box, Text } from "ink"; import type { Configuration } from "../sync/index.js"; import { pull } from "../sync/orchestrate.js"; import { ResourceResults, useSyncCommand, Warnings } from "./sync-command.js"; export default function Pull(configuration: Configuration) { const state = useSyncCommand(() => pull(configuration), [configuration]); return ( {state.status === "error" ? ( Error: {state.error} ) : state.status === "done" ? ( <> directory: {configuration.directory} ) : state.status === "running" ? ( Pulling... ) : null} ); }