import type { Vector3Dto } from "./contractsCommon";
import type { ShipOrderTemplateSnapshot } from "./contractsShips";

export interface PlayerOrganizationCommandRequest {
  kind: string;
  label: string;
  parentOrganizationId?: string | null;
  frontId?: string | null;
  homeSystemId?: string | null;
  homeStationId?: string | null;
  policyId?: string | null;
  automationPolicyId?: string | null;
  reinforcementPolicyId?: string | null;
  targetFactionId?: string | null;
  priority?: number | null;
  role?: string | null;
  reserveKind?: string | null;
  systemIds?: string[] | null;
  focusItemIds?: string[] | null;
  notes?: string | null;
}

export interface PlayerOrganizationMembershipCommandRequest {
  assetIds?: string[] | null;
  childOrganizationIds?: string[] | null;
  systemIds?: string[] | null;
  frontIds?: string[] | null;
  replace?: boolean;
}

export interface PlayerDirectiveCommandRequest {
  label: string;
  kind: string;
  scopeKind: string;
  scopeId: string;
  behaviorKind: string;
  useOrders: boolean;
  stagingOrderKind?: string | null;
  targetEntityId?: string | null;
  targetSystemId?: string | null;
  targetPosition?: Vector3Dto | null;
  homeSystemId?: string | null;
  homeStationId?: string | null;
  sourceStationId?: string | null;
  destinationStationId?: string | null;
  itemId?: string | null;
  preferredNodeId?: string | null;
  preferredConstructionSiteId?: string | null;
  preferredModuleId?: string | null;
  priority: number;
  radius?: number | null;
  waitSeconds?: number | null;
  maxSystemRange?: number | null;
  knownStationsOnly?: boolean | null;
  patrolPoints?: Vector3Dto[] | null;
  repeatOrders?: ShipOrderTemplateSnapshot[] | null;
  policyId?: string | null;
  automationPolicyId?: string | null;
  notes?: string | null;
}

export interface PlayerPolicyCommandRequest {
  label: string;
  scopeKind: string;
  scopeId?: string | null;
  policySetId?: string | null;
  allowDelegatedCombat: boolean;
  allowDelegatedTrade: boolean;
  reserveCreditsRatio: number;
  reserveMilitaryRatio: number;
  notes?: string | null;
  tradeAccessPolicy?: string | null;
  dockingAccessPolicy?: string | null;
  constructionAccessPolicy?: string | null;
  operationalRangePolicy?: string | null;
  combatEngagementPolicy?: string | null;
  avoidHostileSystems?: boolean | null;
  fleeHullRatio?: number | null;
  blacklistedSystemIds?: string[] | null;
}

export interface PlayerAutomationPolicyCommandRequest {
  label: string;
  scopeKind: string;
  scopeId?: string | null;
  enabled: boolean;
  behaviorKind: string;
  useOrders: boolean;
  stagingOrderKind?: string | null;
  maxSystemRange: number;
  knownStationsOnly: boolean;
  radius: number;
  waitSeconds: number;
  preferredItemId?: string | null;
  notes?: string | null;
  repeatOrders?: ShipOrderTemplateSnapshot[] | null;
}

export interface PlayerAssetAssignmentCommandRequest {
  assetKind: string;
  assetId: string;
  fleetId?: string | null;
  taskForceId?: string | null;
  stationGroupId?: string | null;
  economicRegionId?: string | null;
  frontId?: string | null;
  reserveId?: string | null;
  directiveId?: string | null;
  policyId?: string | null;
  automationPolicyId?: string | null;
  role: string;
  clearConflicts?: boolean;
}

export interface PlayerStrategicIntentCommandRequest {
  strategicPosture: string;
  economicPosture: string;
  militaryPosture: string;
  logisticsPosture: string;
  desiredReserveRatio: number;
  allowDelegatedCombatAutomation: boolean;
  allowDelegatedEconomicAutomation: boolean;
  notes?: string | null;
}
