/// <reference path="../js/002-config/fc-js-init.js" />
namespace App {
	namespace Art {}

	namespace Corporate {}

	namespace Data {
		namespace Pronouns {
			class Definition {
				pronoun: string;
				possessive: string;
				possessivePronoun: string;
				object: string;
				objectReflexive: string;
				noun: string;
			}
		}

		namespace SlaveSummary{
			class SmartPiercing{
				setting: {
					off: string,
					submissive: string,
					lesbian: string,
					oral: string,
					humiliation: string,
					anal: string,
					boobs: string,
					sadist: string,
					masochist: string,
					dom: string,
					pregnancy: string,
					vanilla: string,
					all: string,
					none: string,
					monitoring: string,
					men: string,
					women: string,
					"anti-men": string,
					"anti-women": string,
				}
			}
		}

		class JobDesc {
			position: string;
			assignment: string;
			publicSexUse: boolean = false;
			fuckdollAccepted: boolean = false;
			broodmotherAccepted?: boolean;
			/** workers can take part time jobs in addition to their main (full-time) one */
			partTime?:boolean = false;
		}

		class ManagerJobDesc extends JobDesc {
			shouldWalk: boolean = true;
			shouldHold: boolean = true;
			shouldSee: boolean = true;
			shouldHear: boolean = true;
			shouldTalk: boolean = true;
			shouldThink: boolean = true;
			requiredDevotion:number = 50;
			/** Applicable careers */
			careers:string[] = [];
			/** Applicable skill name */
			skill:string = null;
		}
	}

	namespace Debug {}
	namespace Desc {}

	namespace Encyclopedia {
		namespace Entries {}
	}

	namespace Facilities {}

	namespace Interact {}

	namespace Intro {}

	namespace MainView {}

	namespace RA {
		class NumericTarget {
			cond: string;
			val: number;
		}

		class NumericRange {
			min: number;
			max: number;
		}

		class RuleConditions {
			function: boolean | string;
			data: any;
			assignment: string[];
			selectedSlaves: number[];
			excludedSlaves: number[];
		}

		class RuleSurgerySettings {
			eyes: number;
			hears: number;
			smells: number;
			tastes: number;
			lactation: number;
			prostate: number;
			cosmetic: number;
			accent: number;
			shoulders: number;
			shouldersImplant: number;
			boobs: NumericTarget;
			hips: number;
			hipsImplant: number;
			butt: NumericTarget;
			faceShape: string;
			lips: NumericTarget;
			holes: number;
			hair: number;
			bodyhair: number;
			vasectomy: boolean;
			bellyImplant: string;
			tummy: number;
			earShape: number;
			horn: number;
		}

		class RuleGrowthSetters {
			boobs: NumericTarget;
			butt: NumericTarget;
			lips: NumericTarget;
			dick: NumericTarget;
			balls: NumericTarget;
			intensity: number;
		}

		class RuleReleaseSetters {
			masturbation: number;
			partner: number;
			family: number;
			slaves: number;
			master: number;
		}

		class RuleSetters {
			releaseRules: RuleReleaseSetters;
			toyHole: string;
			clitSetting: string;
			clitSettingXY: number;
			clitSettingXX: number;
			clitSettingEnergy: number;
			speechRules: string;
			clothes: string;
			collar: string;
			faceAccessory: string;
			mouthAccessory: string;
			shoes: string;
			armAccessory: string;
			legAccessory: string;
			chastityVagina: number;
			chastityAnus: number;
			chastityPenis: number;
			virginAccessory: string;
			aVirginAccessory: string;
			vaginalAccessory: string;
			aVirginDickAccessory: string;
			dickAccessory: string;
			bellyAccessory: string;
			aVirginButtplug: string;
			buttplug: string;
			vaginalAttachment: string;
			buttplugAttachment: string;
			eyeColor: string;
			makeup: number;
			nails: number;
			hColor: string;
			hLength: number;
			haircuts: number;
			hStyle: string;
			eyebrowHColor: string;
			eyebrowHStyle: string;
			eyebrowFullness: string;
			markings: string;
			pubicHColor: string;
			pubicHStyle: string;
			nipplesPiercing: number;
			areolaePiercing: number;
			clitPiercing: number;
			vaginaLube: number;
			vaginaPiercing: number;
			dickPiercing: number;
			anusPiercing: number;
			lipsPiercing: number;
			tonguePiercing: number;
			earPiercing: number;
			nosePiercing: number;
			eyebrowPiercing: number;
			navelPiercing: number;
			corsetPiercing: number;
			boobsTat: string | number;
			buttTat: string | number;
			vaginaTat: string | number;
			dickTat: string | number;
			lipsTat: string | number;
			anusTat: string | number;
			shouldersTat: string | number;
			armsTat: string | number;
			legsTat: string | number;
			backTat: string | number;
			stampTat: string | number;
			birthsTat: string | number;
			abortionTat: string | number;
			pitRules: number;
			curatives: number;
			livingRules: string;
			relationshipRules: string;
			standardPunishment: string;
			standardReward: string;
			weight: NumericRange;
			diet: string;
			dietCum: number;
			dietMilk: number;
			onDiet: number;
			muscles: NumericTarget;
			XY: number;
			XX: number;
			gelding: number;
			preg: boolean;
			abortion: string[];
			growth: RuleGrowthSetters;
			hyper_drugs: number;
			aphrodisiacs: number;
			autoSurgery: number;
			autoBrand: number;
			pornFeed: number;
			pornFameSpending: number;
			dietGrowthSupport: number;
			eyewear: string;
			earwear: string;
			setAssignment: string;
			facilityRemove: boolean;
			removalAssignment: string;
			surgery: RuleSurgerySettings;
			underArmHColor: string;
			underArmHStyle: string;
			drug: string;
			eyes: string;
			pregSpeed: string;
			bellyImplantVol: number;
			teeth: string;
			label: string;
			removeLabel: string;
			skinColor: string;
			inflationType: string;
			brandTarget: string;
			brandDesign: string;
			scarTarget: string;
			scarDesign: string;
			hornColor: string;
			labelTagsClear: boolean;
		}

		declare interface Rule {
			ID: string;
			name: string;
			condition: RuleConditions;
			set: RuleSetters;
		}
	}

	namespace SecExp {}
	namespace SF {}

	namespace UI {
		namespace DOM {
			namespace Widgets { }

			declare function makeElement<K extends keyof HTMLElementTagNameMap>(tag: K, content: string | Node, classNames?: string | string[]): HTMLElementTagNameMap[K];
			declare function appendNewElement<K extends keyof HTMLElementTagNameMap>(tag: K, parent: ParentNode, content?: string | Node, classNames?: string | string[]): HTMLElementTagNameMap[K];
		}
		namespace View { }
		namespace SlaveSummary {
			type AppendRenderer = (slave: FC.SlaveState, parentNode: Node) => void;

			class AbbreviationState {
				clothes: number;
				devotion: number;
				diet: number;
				drugs: number;
				genitalia: number;
				health: number;
				hormoneBalance: number;
				mental: number;
				nationality: number;
				origins: number;
				physicals: number;
				race: number;
				rules: number;
				rulesets: number;
				skills: number;
			}
			class State {
				abbreviation: AbbreviationState;
			}
		}
	}

	namespace Update {}
	namespace Utils {}

	namespace Medicine {
		namespace Surgery {
			/**
			 * Describes surgical procedure
			 */
			class Procedure {
				/**
				 * Type code that identifies this kind of procedure.
				 * Currently unused, but planned for future use by RA for prioritizing procedures
				 */
				typeId: string;
				/**
				 * Short label for the procedure. Can be used as a link text.
				 */
				label: string;
				/**
				 * If procedure is targeted at changing object characteristic, this is the net change (signed)
				 */
				targetEffect: number;
				/**
				 * Description of the procedure, more or less detailed
				 */
				description: string;
				/**
				 * Money costs (positive when you pay for it)
				 */
				costs: number;
				/**
				 * Projected health loss (positive when health decreases)
				 */
				healthCosts: number;
				/**
				 * Function to perform the procedure
				 * If action is undefined, the procedure can't be applied (and .description contains the reason)
				 */
				action: slaveOperation;
				/**
				 * surgery type for passages like "Surgery Degradation"
				 */
				surgeryType: string;
			}

			class SizingOptions {
				/** include possible augmentation procedures */
				augmentation?: boolean;
				/** include possible reduction procedures */
				reduction?: boolean;
				/** include option to install string implants */
				strings?: boolean;
				/** include implant change options */
				replace?: boolean;
			}
		}
		namespace OrganFarm {
			namespace Organs {
			}
		}
	}
}

declare namespace FC {
	// black magic to make TypeScript understand that App.Entity.SlaveState is a type
	type SlaveState = InstanceType<typeof App.Entity.SlaveState>;

	type FSPolicy = number | "unset";

	interface ArcologyState {
		name: string;
		direction: string | NoObject;
		government: string;
		leaderID: number;
		honeymoon: number;
		prosperity: number;
		ownership: number;
		minority: number;
		PCminority: number;
		demandFactor: number;
		FSSupremacist: FSPolicy;
		FSSupremacistRace: string | NoObject;
		FSSubjugationist: FSPolicy;
		FSSubjugationistRace: string | NoObject;
		FSGenderRadicalist: FSPolicy;
		FSGenderFundamentalist: FSPolicy;
		FSPaternalist: FSPolicy;
		FSDegradationist: FSPolicy;
		FSBodyPurist: FSPolicy;
		FSTransformationFetishist: FSPolicy;
		FSYouthPreferentialist: FSPolicy;
		FSMaturityPreferentialist: FSPolicy;
		FSSlimnessEnthusiast: FSPolicy;
		FSAssetExpansionist: FSPolicy;
		FSPastoralist: FSPolicy;
		FSPhysicalIdealist: FSPolicy;
		FSChattelReligionist: FSPolicy;
		FSRomanRevivalist: FSPolicy;
		FSAztecRevivalist: FSPolicy;
		FSEgyptianRevivalist: FSPolicy;
		FSEdoRevivalist: FSPolicy;
		FSArabianRevivalist: FSPolicy;
		FSChineseRevivalist: FSPolicy;
		FSNull: FSPolicy;
		embargo: number;
		embargoTarget: number;
		influenceTarget: number;
		influenceBonus: number;
		CyberEconomic: number;
		CyberEconomicTarget: number;
		CyberReputation: number;
		CyberReputationTarget: number;
		rival: number;
		FSRestart: FSPolicy;
		FSRepopulationFocus: FSPolicy;
		FSHedonisticDecadence: FSPolicy;
		FSIntellectualDependency: FSPolicy;
		FSSlaveProfessionalism: FSPolicy;
		FSPetiteAdmiration: FSPolicy;
		FSStatuesqueGlorification: FSPolicy;
		FSCummunism: FSPolicy;
		FSIncestFetishist: FSPolicy;
		FSGenderRadicalistResearch: number;
		FSGenderFundamentalistResearch: number;
		FSPaternalistResearch: number;
		FSDegradationistResearch: number;
		FSBodyPuristResearch: number;
		FSTransformationFetishistResearch: number;
		FSYouthPreferentialistResearch: number;
		FSMaturityPreferentialistResearch: number;
		FSSlimnessEnthusiastResearch: number;
		FSAssetExpansionistResearch: number;
		FSPastoralistResearch: number;
		FSPhysicalIdealistResearch: number;
		FSRepopulationFocusResearch: number;
		FSRestartResearch: number;
		FSHedonisticDecadenceResearch: number;
		FSHedonisticDecadenceDietResearch: number;
		FSIntellectualDependencyResearch: number;
		FSSlaveProfessionalismResearch: number;
		FSPetiteAdmirationResearch: number;
		FSStatuesqueGlorificationResearch: number;
		FSCummunismResearch: number;
		FSIncestFetishistResearch: number;
		FSSupremacistDecoration: number;
		FSSubjugationistDecoration: number;
		FSGenderRadicalistDecoration: number;
		FSGenderFundamentalistDecoration: number;
		FSPaternalistDecoration: number;
		FSDegradationistDecoration: number;
		FSBodyPuristDecoration: number;
		FSTransformationFetishistDecoration: number;
		FSYouthPreferentialistDecoration: number;
		FSMaturityPreferentialistDecoration: number;
		FSSlimnessEnthusiastDecoration: number;
		FSAssetExpansionistDecoration: number;
		FSPastoralistDecoration: number;
		FSPhysicalIdealistDecoration: number;
		FSChattelReligionistDecoration: number;
		FSRomanRevivalistDecoration: number;
		FSAztecRevivalistDecoration: number;
		FSEgyptianRevivalistDecoration: number;
		FSEdoRevivalistDecoration: number;
		FSArabianRevivalistDecoration: number;
		FSChineseRevivalistDecoration: number;
		FSRepopulationFocusDecoration: number;
		FSRestartDecoration: number;
		FSHedonisticDecadenceDecoration: number;
		FSIntellectualDependencyDecoration: number;
		FSSlaveProfessionalismDecoration: number;
		FSPetiteAdmirationDecoration: number;
		FSStatuesqueGlorificationDecoration: number;
		FSCummunismDecoration: number;
		FSIncestFetishistDecoration: number;
		FSSupremacistLawME: number;
		FSSupremacistSMR: number;
		FSSubjugationistLawME: number;
		FSSubjugationistSMR: number;
		FSGenderRadicalistLawFuta: number;
		FSGenderRadicalistLawBeauty: number;
		FSGenderFundamentalistLawBimbo: number;
		FSGenderFundamentalistSMR: number;
		FSGenderFundamentalistLawBeauty: number;
		FSPaternalistLaw: number;
		FSPaternalistSMR: number;
		FSDegradationistLaw: number;
		FSDegradationistSMR: number;
		FSBodyPuristLaw: number;
		FSBodyPuristSMR: number;
		FSTransformationFetishistSMR: number;
		FSYouthPreferentialistLaw: number;
		FSYouthPreferentialistSMR: number;
		FSMaturityPreferentialistLaw: number;
		FSMaturityPreferentialistSMR: number;
		FSSlimnessEnthusiastSMR: number;
		FSSlimnessEnthusiastLaw: number;
		FSAssetExpansionistSMR: number;
		FSPastoralistLaw: number;
		FSPastoralistSMR: number;
		FSPhysicalIdealistSMR: number;
		FSPhysicalIdealistLaw: number;
		FSPhysicalIdealistStrongFat: number;
		FSChattelReligionistLaw: number;
		FSChattelReligionistSMR: number;
		FSChattelReligionistCreed: number;
		FSRomanRevivalistLaw: number;
		FSRomanRevivalistSMR: number;
		FSAztecRevivalistLaw: number;
		FSAztecRevivalistSMR: number;
		FSEgyptianRevivalistLaw: number;
		FSEgyptianRevivalistSMR: number;
		FSEdoRevivalistLaw: number;
		FSEdoRevivalistSMR: number;
		FSArabianRevivalistLaw: number;
		FSArabianRevivalistSMR: number;
		FSChineseRevivalistLaw: number;
		FSChineseRevivalistSMR: number;
		FSRepopulationFocusLaw: number;
		FSRepopulationFocusSMR: number;
		FSRestartLaw: number;
		FSRestartSMR: number;
		FSHedonisticDecadenceLaw: number;
		FSHedonisticDecadenceLaw2: number;
		FSHedonisticDecadenceStrongFat: number;
		FSHedonisticDecadenceSMR: number;
		FSIntellectualDependencyLaw: number;
		FSIntellectualDependencyLawBeauty: number;
		FSIntellectualDependencySMR: number;
		FSSlaveProfessionalismLaw: number;
		FSSlaveProfessionalismSMR: number;
		FSPetiteAdmirationLaw: number;
		FSPetiteAdmirationLaw2: number;
		FSPetiteAdmirationSMR: number;
		FSStatuesqueGlorificationLaw: number;
		FSStatuesqueGlorificationLaw2: number;
		FSStatuesqueGlorificationSMR: number;
		FSRestartResearchPassed: number;
		FSEgyptianRevivalistIncestPolicy: number;
		FSEgyptianRevivalistInterest: number;
		FSRepopulationFocusPregPolicy: number;
		FSRepopulationFocusMilfPolicy: number;
		FSRepopulationFocusInterest: number;
		FSEugenicsChastityPolicy: number;
		FSEugenicsSterilizationPolicy: number;
		FSEugenicsInterest: number;
		childhoodFertilityInducedNCSResearch: number;
		hackingEconomic: number;
		hackingEconomicTarget: number;
		hackingReputationTarget: number;
		hackingReputation: number;
	}

	enum NoObject {
		Value = 0
	}

	type SlaveStateOrZero = SlaveState | NoObject;

	type DefaultGameStateVariables = typeof App.Data.defaultGameStateVariables;
	type ResetOnNGPVariables = typeof App.Data.resetOnNGPlus;
	interface GameVariables extends DefaultGameStateVariables, ResetOnNGPVariables {}
}

declare const V: FC.GameVariables;

devTools/FC.ts