const enum ESexEncounterFamiliarity{
    LOVE="love",
    FRIEND="friend",
    ACQUAINTANCE="acquaintance",
    STRANGER="stranger"
}

const enum ESexEncounterType {
    VAGINAL="vaginal",
    ANAL="anal",
    BJ_GIVE="bj_give",
    BJ_RECEIVE="bj_receive",
    HJ_GIVE="hj_give",
    HJ_RECEIVE="hj_receive"
}

Macro.add('sex', {
	skipArgs : false,
	handler  : function () {
		try {
			const pc = State.variables.pc;
            const npcIdOrObject:NPC|string = this.args[0];
            const flags:{[key:string]:any} = this.args[1] ?? {};

            pc.sexEncounterRegister(
                npcIdOrObject,
                flags.type ?? ESexEncounterType.VAGINAL,
                flags.fam ?? ESexEncounterFamiliarity.ACQUAINTANCE,
                flags.aware ?? true,
                flags.time ?? State.variables.time.now
            )
		}
		catch (ex) {
			return this.error('ERROR in sex-widget: ' + ex.message);
		}
	}
});