"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CancelVotingRequestFixture = exports.VotingRightsFixture = exports.VotingForFixture = exports.EquityDetailsFixture = exports.DividendForFixture = exports.DividendFixture = exports.ScheduledBalanceAdjustmentFixture = exports.SetVotingRightsCommandFixture = exports.SetDividendCommandFixture = exports.CancelScheduledBalanceAdjustmentRequestFixture = exports.CancelScheduledBalanceAdjustmentCommandFixture = exports.CancelDividendRequestFixture = exports.CancelDividendCommandFixture = exports.SetScheduledBalanceAdjustmentCommandFixture = exports.CreateTrexSuiteEquityCommandFixture = exports.CreateEquityCommandFixture = exports.GetTotalVotingHoldersQueryFixture = exports.GetVotingHoldersQueryFixture = exports.GetTotalDividendHoldersQueryFixture = exports.GetDividendHoldersQueryFixture = exports.GetConfigInfoQueryFixture = exports.GetRegulationDetailsQueryFixture = exports.GetEquityDetailsQueryFixture = exports.GetVotingForQueryFixture = exports.GetVotingCountQueryFixture = exports.GetVotingQueryFixture = exports.GetDividendQueryFixture = exports.GetDividendAmountForQueryFixture = exports.GetDividendForQueryFixture = exports.GetDividendsCountQueryFixture = exports.GetScheduledBalanceAdjustmentCountQueryFixture = exports.GetScheduledBalanceAdjustmentQueryFixture = exports.GetTotalVotingHoldersRequestFixture = exports.GetVotingHoldersRequestFixture = exports.GetTotalDividendHoldersRequestFixture = exports.GetDividendHoldersRequestFixture = exports.GetAllScheduledBalanceAdjustmentsRequestFixture = exports.GetScheduledBalanceAdjustmentRequestFixture = exports.GetScheduledBalanceAdjustmentCountRequestFixture = exports.SetScheduledBalanceAdjustmentRequestFixture = exports.GetAllVotingRightsRequestFixture = exports.GetVotingRightsRequestFixture = exports.GetVotingRightsForRequestFixture = exports.SetVotingRightsRequestFixture = exports.GetAllDividendsRequestFixture = exports.GetDividendRequestFixture = exports.GetDividendForRequestFixture = exports.SetDividendRequestFixture = exports.GetEquityDetailsRequestFixture = exports.CreateEquityRequestFixture = void 0;
exports.CreateTrexSuiteEquityRequestFixture = exports.CancelVotingCommandFixture = void 0;
const config_1 = require("../config");
const RegulationType_1 = require("../../../src/domain/context/factory/RegulationType");
const DataFixture_1 = require("../shared/DataFixture");
const HederaId_1 = require("../../../src/domain/context/shared/HederaId");
const _1 = require("@faker-js/faker/.");
const DividendType_1 = require("../../../src/domain/context/equity/DividendType");
const ContractId_1 = __importDefault(require("../../../src/domain/context/contract/ContractId"));
const SecurityFixture_1 = require("../shared/SecurityFixture");
exports.CreateEquityRequestFixture = (0, config_1.createFixture)((request) => {
    request.name.faker((faker) => faker.company.name());
    request.symbol.faker((faker) => faker.string.alpha({ length: 3, casing: "upper" }));
    request.isin.faker((faker) => `US${faker.string.numeric(9)}`);
    request.decimals.faker((faker) => faker.number.int({ min: 0, max: 18 }));
    request.isWhiteList.faker((faker) => faker.datatype.boolean());
    request.isControllable.faker((faker) => faker.datatype.boolean());
    request.arePartitionsProtected.faker((faker) => faker.datatype.boolean());
    request.clearingActive.faker((faker) => faker.datatype.boolean());
    request.internalKycActivated.faker((faker) => faker.datatype.boolean());
    request.isMultiPartition.faker((faker) => faker.datatype.boolean());
    const regulationType = RegulationType_1.CastRegulationType.toNumber(_1.faker.helpers.arrayElement(Object.values(RegulationType_1.RegulationType).filter((type) => type !== RegulationType_1.RegulationType.NONE)));
    request.regulationType?.as(() => regulationType);
    request.regulationSubType?.faker((faker) => regulationType === RegulationType_1.CastRegulationType.toNumber(RegulationType_1.RegulationType.REG_S)
        ? RegulationType_1.CastRegulationSubType.toNumber(RegulationType_1.RegulationSubType.NONE)
        : RegulationType_1.CastRegulationSubType.toNumber(faker.helpers.arrayElement(Object.values(RegulationType_1.RegulationSubType).filter((subType) => subType !== RegulationType_1.RegulationSubType.NONE))));
    request.isCountryControlListWhiteList.faker((faker) => faker.datatype.boolean());
    request.numberOfShares.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.countries?.faker((faker) => faker.helpers
        .arrayElements(Array.from({ length: 5 }, () => faker.location.countryCode({ variant: "alpha-2" })), { min: 1, max: 5 })
        .join(","));
    request.info.faker((faker) => faker.lorem.words());
    request.currency.faker((faker) => `0x${Buffer.from(faker.finance.currencyCode()).toString("hex")}`);
    request.dividendRight.faker((faker) => DividendType_1.CastDividendType.toNumber(faker.helpers.arrayElement(Object.values(DividendType_1.DividendType))));
    request.nominalValue.faker((faker) => faker.finance.amount({ min: 1, max: 10, dec: 2 }));
    request.nominalValueDecimals.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    request.votingRight.faker((faker) => faker.datatype.boolean());
    request.liquidationRight.faker((faker) => faker.datatype.boolean());
    request.subscriptionRight.faker((faker) => faker.datatype.boolean());
    request.conversionRight.faker((faker) => faker.datatype.boolean());
    request.redemptionRight.faker((faker) => faker.datatype.boolean());
    request.putRight.faker((faker) => faker.datatype.boolean());
    request.configId.faker((faker) => `0x000000000000000000000000000000000000000000000000000000000000000${faker.number.int({ min: 1, max: 9 })}`);
    request.configVersion.as(() => 1);
    request.diamondOwnerAccount?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.externalPausesIds?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.externalControlListsIds?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.externalKycListsIds?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.complianceId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.identityRegistryId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetEquityDetailsRequestFixture = (0, config_1.createFixture)((request) => {
    request.equityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.SetDividendRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.amountPerUnitOfSecurity.faker((faker) => faker.number.int({ min: 1, max: 12 }).toString());
    request.recordTimestamp.faker((faker) => faker.date.past().getTime().toString());
    request.executionTimestamp.faker((faker) => faker.date.future().getTime().toString());
});
exports.GetDividendForRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetDividendRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetAllDividendsRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.SetVotingRightsRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.recordTimestamp.faker((faker) => faker.date.past().getTime().toString());
    request.data.as(() => "0x");
});
exports.GetVotingRightsForRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.votingId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetVotingRightsRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.votingId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetAllVotingRightsRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.SetScheduledBalanceAdjustmentRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.executionDate.faker((faker) => faker.date.past().getTime().toString());
    request.factor.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.decimals.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
});
exports.GetScheduledBalanceAdjustmentCountRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetScheduledBalanceAdjustmentRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.balanceAdjustmentId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetAllScheduledBalanceAdjustmentsRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetDividendHoldersRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    request.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    request.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetTotalDividendHoldersRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetVotingHoldersRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.voteId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    request.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    request.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetTotalVotingHoldersRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.voteId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetScheduledBalanceAdjustmentQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.balanceAdjustmentId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetScheduledBalanceAdjustmentCountQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetDividendsCountQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetDividendForQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.dividendId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetDividendAmountForQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.dividendId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetDividendQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.dividendId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetVotingQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.votingId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetVotingCountQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetVotingForQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    query.votingId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetEquityDetailsQueryFixture = (0, config_1.createFixture)((query) => {
    query.equityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetRegulationDetailsQueryFixture = (0, config_1.createFixture)((query) => {
    query.type.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.subType.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.factory?.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetConfigInfoQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetDividendHoldersQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    query.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetTotalDividendHoldersQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetVotingHoldersQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.voteId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    query.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.GetTotalVotingHoldersQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.voteId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.CreateEquityCommandFixture = (0, config_1.createFixture)((command) => {
    command.security.fromFixture(SecurityFixture_1.SecurityPropsFixture);
    command.currency.faker((faker) => faker.finance.currencyCode());
    command.nominalValue.faker((faker) => faker.finance.amount({ min: 1, max: 10, dec: 2 }));
    command.nominalValueDecimals.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    command.votingRight.faker((faker) => faker.datatype.boolean());
    command.informationRight.faker((faker) => faker.datatype.boolean());
    command.liquidationRight.faker((faker) => faker.datatype.boolean());
    command.subscriptionRight.faker((faker) => faker.datatype.boolean());
    command.conversionRight.faker((faker) => faker.datatype.boolean());
    command.redemptionRight.faker((faker) => faker.datatype.boolean());
    command.putRight.faker((faker) => faker.datatype.boolean());
    command.dividendRight.faker((faker) => faker.datatype.boolean());
    command.currency.faker((faker) => faker.string.hexadecimal({ length: 6, casing: "lower", prefix: "0x" }));
    command.factory?.as(() => new ContractId_1.default(DataFixture_1.ContractIdPropFixture.create().value));
    command.resolver?.as(() => new ContractId_1.default(DataFixture_1.ContractIdPropFixture.create().value));
    command.configId?.faker((faker) => faker.string.hexadecimal({ length: 64, casing: "lower", prefix: "0x" }));
    command.configVersion?.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    command.diamondOwnerAccount?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.externalControlListsIds?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    command.externalKycListsIds?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    command.complianceId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.identityRegistryId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.CreateTrexSuiteEquityCommandFixture = (0, config_1.createFixture)((command) => {
    command.salt.faker((faker) => faker.string.alphanumeric({ length: 32 }));
    command.owner.faker((faker) => faker.finance.accountName());
    command.irs.faker((faker) => faker.finance.iban());
    command.onchainId.faker((faker) => faker.finance.ethereumAddress());
    command.irAgents.faker((faker) => [faker.finance.ethereumAddress()]);
    command.tokenAgents.faker((faker) => [faker.finance.ethereumAddress()]);
    command.compliancesModules.faker((faker) => [faker.string.alphanumeric({ length: 32 })]);
    command.complianceSettings.faker((faker) => [faker.string.alphanumeric({ length: 32 })]);
    command.claimTopics.faker((faker) => [faker.number.int({ min: 1, max: 10 })]);
    command.issuers.faker((faker) => [faker.finance.ethereumAddress()]);
    command.issuerClaims.faker((faker) => [faker.number.int({ min: 1, max: 10 })]);
    command.security.fromFixture(SecurityFixture_1.SecurityPropsFixture);
    command.currency.faker((faker) => faker.finance.currencyCode());
    command.nominalValue.faker((faker) => faker.finance.amount({ min: 1, max: 10, dec: 2 }));
    command.nominalValueDecimals.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    command.votingRight.faker((faker) => faker.datatype.boolean());
    command.informationRight.faker((faker) => faker.datatype.boolean());
    command.liquidationRight.faker((faker) => faker.datatype.boolean());
    command.subscriptionRight.faker((faker) => faker.datatype.boolean());
    command.conversionRight.faker((faker) => faker.datatype.boolean());
    command.redemptionRight.faker((faker) => faker.datatype.boolean());
    command.putRight.faker((faker) => faker.datatype.boolean());
    command.dividendRight.faker((faker) => faker.datatype.boolean());
    command.currency.faker((faker) => faker.string.hexadecimal({ length: 6, casing: "lower", prefix: "0x" }));
    command.factory?.as(() => new ContractId_1.default(DataFixture_1.ContractIdPropFixture.create().value));
    command.resolver?.as(() => new ContractId_1.default(DataFixture_1.ContractIdPropFixture.create().value));
    command.configId?.faker((faker) => faker.string.hexadecimal({ length: 64, casing: "lower", prefix: "0x" }));
    command.configVersion?.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    command.diamondOwnerAccount?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.externalControlLists?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    command.externalKycLists?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    command.compliance?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.identityRegistry?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.SetScheduledBalanceAdjustmentCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.executionDate.faker((faker) => faker.date.future().getTime().toString());
    command.factor.faker((faker) => faker.number.int().toString());
    command.decimals.faker((faker) => faker.number.int().toString());
});
exports.CancelDividendCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.CancelDividendRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.dividendId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.CancelScheduledBalanceAdjustmentCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.balanceAdjustmentId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.CancelScheduledBalanceAdjustmentRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.balanceAdjustmentId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.SetDividendCommandFixture = (0, config_1.createFixture)((command) => {
    command.address.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    let recordDate;
    command.recordDate.faker((faker) => {
        recordDate = faker.date.future();
        return recordDate.getTime().toString();
    });
    command.executionDate.faker((faker) => {
        return faker.date.future({ refDate: recordDate }).getTime().toString();
    });
    command.amount.faker((faker) => faker.number.int().toString());
});
exports.SetVotingRightsCommandFixture = (0, config_1.createFixture)((command) => {
    command.address.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.recordDate.faker((faker) => faker.date.future().getTime().toString());
    command.data.faker((faker) => {
        return faker.string.hexadecimal({
            length: 64,
            casing: "lower",
            prefix: "0x",
        });
    });
});
exports.ScheduledBalanceAdjustmentFixture = (0, config_1.createFixture)((props) => {
    props.executionTimeStamp.faker((faker) => faker.date.future());
    props.factor.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.decimals.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.isDisabled.faker((faker) => faker.datatype.boolean());
});
exports.DividendFixture = (0, config_1.createFixture)((props) => {
    props.amountPerUnitOfSecurity.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.recordTimeStamp.faker((faker) => faker.date.past());
    props.executionTimeStamp.faker((faker) => faker.date.future());
    props.snapshotId?.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.isDisabled.faker((faker) => faker.datatype.boolean());
});
exports.DividendForFixture = (0, config_1.createFixture)((props) => {
    props.tokenBalance.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.decimals.faker((faker) => faker.date.past());
    props.isDisabled.faker((faker) => faker.datatype.boolean());
});
exports.EquityDetailsFixture = (0, config_1.createFixture)((props) => {
    props.votingRight.faker((faker) => faker.datatype.boolean());
    props.informationRight.faker((faker) => faker.datatype.boolean());
    props.liquidationRight.faker((faker) => faker.datatype.boolean());
    props.subscriptionRight.faker((faker) => faker.datatype.boolean());
    props.conversionRight.faker((faker) => faker.datatype.boolean());
    props.redemptionRight.faker((faker) => faker.datatype.boolean());
    props.putRight.faker((faker) => faker.datatype.boolean());
    props.dividendRight.faker((faker) => faker.helpers.arrayElement(Object.values(DividendType_1.DividendType)));
    props.currency.faker((faker) => faker.finance.currencyCode());
    props.nominalValue.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.nominalValueDecimals.faker((faker) => faker.number.int({ min: 1, max: 5 }));
});
exports.VotingForFixture = (0, config_1.createFixture)((props) => {
    props.tokenBalance.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.decimals.faker((faker) => faker.date.past());
    props.isDisabled.faker((faker) => faker.datatype.boolean());
});
exports.VotingRightsFixture = (0, config_1.createFixture)((props) => {
    props.data.faker((faker) => faker.lorem.words());
    props.recordTimeStamp.faker((faker) => faker.date.past());
    props.snapshotId?.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.isDisabled.faker((faker) => faker.datatype.boolean());
});
exports.CancelVotingRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.votingId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.CancelVotingCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.votingId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.CreateTrexSuiteEquityRequestFixture = (0, config_1.createFixture)((request) => {
    request.salt.faker((faker) => faker.string.alphanumeric({ length: 32 }));
    request.owner.faker((faker) => faker.finance.accountName());
    request.irs.faker((faker) => faker.finance.iban());
    request.onchainId.faker((faker) => faker.finance.ethereumAddress());
    request.irAgents.faker((faker) => [faker.finance.ethereumAddress()]);
    request.tokenAgents.faker((faker) => [faker.finance.ethereumAddress()]);
    request.compliancesModules.faker((faker) => [faker.string.alphanumeric({ length: 32 })]);
    request.complianceSettings.faker((faker) => [faker.string.alphanumeric({ length: 32 })]);
    request.claimTopics.faker((faker) => [faker.number.int({ min: 1, max: 10 })]);
    request.issuers.faker((faker) => [faker.finance.ethereumAddress()]);
    request.issuerClaims.faker((faker) => [faker.number.int({ min: 1, max: 10 })]);
    request.name.faker((faker) => faker.company.name());
    request.symbol.faker((faker) => faker.string.alpha({ length: 3, casing: "upper" }));
    request.isin.faker((faker) => `US${faker.string.numeric(9)}`);
    request.decimals.faker((faker) => faker.number.int({ min: 0, max: 18 }));
    request.isWhiteList.faker((faker) => faker.datatype.boolean());
    request.isControllable.faker((faker) => faker.datatype.boolean());
    request.arePartitionsProtected.faker((faker) => faker.datatype.boolean());
    request.clearingActive.faker((faker) => faker.datatype.boolean());
    request.internalKycActivated.faker((faker) => faker.datatype.boolean());
    request.isMultiPartition.faker((faker) => faker.datatype.boolean());
    const regulationType = RegulationType_1.CastRegulationType.toNumber(_1.faker.helpers.arrayElement(Object.values(RegulationType_1.RegulationType).filter((type) => type !== RegulationType_1.RegulationType.NONE)));
    request.regulationType?.as(() => regulationType);
    request.regulationSubType?.faker((faker) => regulationType === RegulationType_1.CastRegulationType.toNumber(RegulationType_1.RegulationType.REG_S)
        ? RegulationType_1.CastRegulationSubType.toNumber(RegulationType_1.RegulationSubType.NONE)
        : RegulationType_1.CastRegulationSubType.toNumber(faker.helpers.arrayElement(Object.values(RegulationType_1.RegulationSubType).filter((subType) => subType !== RegulationType_1.RegulationSubType.NONE))));
    request.isCountryControlListWhiteList.faker((faker) => faker.datatype.boolean());
    request.numberOfShares.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.countries?.faker((faker) => faker.helpers
        .arrayElements(Array.from({ length: 5 }, () => faker.location.countryCode({ variant: "alpha-2" })), { min: 1, max: 5 })
        .join(","));
    request.info.faker((faker) => faker.lorem.words());
    request.currency.faker((faker) => `0x${Buffer.from(faker.finance.currencyCode()).toString("hex")}`);
    request.dividendRight.faker((faker) => DividendType_1.CastDividendType.toNumber(faker.helpers.arrayElement(Object.values(DividendType_1.DividendType))));
    request.nominalValue.faker((faker) => faker.finance.amount({ min: 1, max: 10, dec: 2 }));
    request.nominalValueDecimals.faker((faker) => faker.number.int({ min: 1, max: 5 }));
    request.votingRight.faker((faker) => faker.datatype.boolean());
    request.liquidationRight.faker((faker) => faker.datatype.boolean());
    request.subscriptionRight.faker((faker) => faker.datatype.boolean());
    request.conversionRight.faker((faker) => faker.datatype.boolean());
    request.redemptionRight.faker((faker) => faker.datatype.boolean());
    request.putRight.faker((faker) => faker.datatype.boolean());
    request.configId.faker((faker) => `0x000000000000000000000000000000000000000000000000000000000000000${faker.number.int({ min: 1, max: 9 })}`);
    request.configVersion.as(() => 1);
    request.diamondOwnerAccount.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.externalPauses?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.externalControlLists?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.externalKycLists?.as(() => [DataFixture_1.HederaIdPropsFixture.create().value]);
    request.complianceId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.identityRegistryId?.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
