/** * @license * Copyright 2026 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { Box, Text } from 'ink'; import { Colors } from '../colors.js'; import { TextInput } from './ProfileCreateWizard/TextInput.js'; import { getBorderStyle } from '../contexts/UnicodeRenderingContext.js'; interface PermissionsTrustPathInputProps { value: string; onChange: (value: string) => void; onSubmit: () => void; errorMessage: string | null; workingDirectory: string; } /** * Free-text entry for an arbitrary folder path. Relative input is resolved * against the working directory and `~` is expanded, both by the shared * normalization helper the caller applies on submit. */ export const PermissionsTrustPathInput: React.FC< PermissionsTrustPathInputProps > = ({ value, onChange, onSubmit, errorMessage, workingDirectory }) => ( Enter a folder path Absolute, relative to{' '} {workingDirectory}, or starting with ~ {errorMessage && ( {errorMessage} )} (Enter to continue, Escape to go back) );