import { DockerNetwork } from '../classes.network.js';

/**
 * Container creation descriptor supporting both string references and class instances.
 * Strings will be resolved to resources internally.
 */
export interface IContainerCreationDescriptor {
  Hostname: string;
  Domainname: string;
  /** Network names (strings) or DockerNetwork instances */
  networks?: (string | DockerNetwork)[];
}

/**
 * Information about an exec instance, including exit code and running state.
 * Retrieved via container.exec().inspect()
 */
export interface IExecInspectInfo {
  /** Exit code of the exec command (0 = success) */
  ExitCode: number;
  /** Whether the exec is currently running */
  Running: boolean;
  /** Process ID */
  Pid: number;
  /** Container ID where exec runs */
  ContainerID: string;
  /** Exec instance ID */
  ID: string;
  /** Whether stderr is open */
  OpenStderr: boolean;
  /** Whether stdin is open */
  OpenStdin: boolean;
  /** Whether stdout is open */
  OpenStdout: boolean;
  /** Whether exec can be removed */
  CanRemove: boolean;
  /** Detach keys */
  DetachKeys: string;
  /** Process configuration */
  ProcessConfig: {
    /** Whether TTY is allocated */
    tty: boolean;
    /** Entrypoint */
    entrypoint: string;
    /** Command arguments */
    arguments: string[];
    /** Whether running in privileged mode */
    privileged: boolean;
  };
}
