/**
 *
 * @param background
 */
export function getDefinitionAvatarUrl(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.avatarUrl) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getAvatarUrl(background) {
    return getDefinitionAvatarUrl(background);
}
/**
 *
 * @param background
 */
export function getDefinitionBonds(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.bonds) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getBonds(background) {
    return getDefinitionBonds(background);
}
/**
 *
 * @param background
 */
export function getDefinitionContractsDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.contractsDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getContractsDescription(background) {
    return getDefinitionContractsDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getDescription(background) {
    return getDefinitionDescription(background);
}
/**
 *
 * @param background
 */
export function getEntityTypeId(background) {
    return getDefinitionEntityTypeId(background);
}
/**
 *
 * @param background
 */
export function getDefinitionEntityTypeId(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.entityTypeId) !== null && _b !== void 0 ? _b : -1;
}
/**
 *
 * @param background
 */
export function getDefinitionEquipmentDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.equipmentDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getEquipmentDescription(background) {
    return getDefinitionEquipmentDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionFeatureDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.featureDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getFeatureDescription(background) {
    return getDefinitionFeatureDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionFeatureName(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.featureName) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getFeatureName(background) {
    return getDefinitionFeatureName(background);
}
/**
 *
 * @param background
 */
export function getDefinitionFlaws(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.flaws) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getFlaws(background) {
    return getDefinitionFlaws(background);
}
/**
 *
 * @param background
 */
export function getId(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : -1;
}
/**
 *
 * @param background
 */
export function getDefinitionIdeals(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.ideals) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getIdeals(background) {
    return getDefinitionIdeals(background);
}
/**
 *
 * @param background
 */
export function getDefinitionLanguagesDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.languagesDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getLanguagesDescription(background) {
    return getDefinitionLanguagesDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionLargeAvatarUrl(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.largeAvatarUrl) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getLargeAvatarUrl(background) {
    return getDefinitionLargeAvatarUrl(background);
}
/**
 *
 * @param background
 */
export function getName(background) {
    return getDefinitionName(background);
}
/**
 *
 * @param background
 */
export function getDefinitionName(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '';
}
/**
 *
 * @param background
 */
export function getDefinitionOrganization(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.organization) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getOrganization(background) {
    return getDefinitionOrganization(background);
}
/**
 *
 * @param background
 */
export function getDefinitionPersonalityTraits(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.personalityTraits) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getPersonalityTraits(background) {
    return getDefinitionPersonalityTraits(background);
}
/**
 *
 * @param background
 */
export function getDefinitionShortDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.shortDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getShortDescription(background) {
    return getDefinitionShortDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSkillProficienciesDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.skillProficienciesDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getSkillProficienciesDescription(background) {
    return getDefinitionSkillProficienciesDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSnippet(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.snippet) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getSnippet(background) {
    return getDefinitionSnippet(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSpellsPostDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.spellsPostDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getSpellsPostDescription(background) {
    return getDefinitionSpellsPostDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSpellsPreDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.spellsPreDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getSpellsPreDescription(background) {
    return getDefinitionSpellsPreDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSuggestedCharacteristicsDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.suggestedCharacteristicsDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getSuggestedCharacteristicsDescription(background) {
    return getDefinitionSuggestedCharacteristicsDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSuggestedLanguages(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.suggestedLanguages) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getSuggestedLanguages(background) {
    return getDefinitionSuggestedLanguages(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSuggestedProficiencies(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.suggestedProficiencies) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getSuggestedProficiencies(background) {
    return getDefinitionSuggestedProficiencies(background);
}
/**
 *
 * @param background
 */
export function getDefinitionToolProficienciesDescription(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.toolProficienciesDescription) !== null && _b !== void 0 ? _b : null;
}
/**
 *
 * @param background
 */
export function getToolProficienciesDescription(background) {
    return getDefinitionToolProficienciesDescription(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSources(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.sources) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getSources(background) {
    return getDefinitionSources(background);
}
/**
 *
 * @param background
 */
export function getDefinitionIsHomebrew(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.isHomebrew) !== null && _b !== void 0 ? _b : false;
}
/**
 *
 * @param background
 */
export function isHomebrew(background) {
    return getDefinitionIsHomebrew(background);
}
/**
 *
 * @param background
 */
export function getDefinitionSpellListIds(background) {
    var _a, _b;
    return (_b = (_a = background.definition) === null || _a === void 0 ? void 0 : _a.spellListIds) !== null && _b !== void 0 ? _b : [];
}
/**
 *
 * @param background
 */
export function getSpellListIds(background) {
    return getDefinitionSpellListIds(background);
}
/**
 *
 * @param background
 */
export function getCustomBackground(background) {
    return background.customBackground;
}
/**
 *
 * @param background
 */
export function getDefinitionId(background) {
    return background.definitionId;
}
/**
 *
 * @param background
 */
export function getHasCustomBackground(background) {
    return background.hasCustomBackground;
}
/**
 *
 * @param background
 */
export function getChoices(background) {
    return background.choices;
}
/**
 *
 * @param background
 */
export function getModifiers(background) {
    return background.modifiers;
}
export function getFeatListContracts(contract) {
    var _a, _b;
    return (_b = (_a = contract === null || contract === void 0 ? void 0 : contract.definition) === null || _a === void 0 ? void 0 : _a.grantedFeats) !== null && _b !== void 0 ? _b : [];
}
export function getFeatLists(background) {
    return background.featLists;
}
