"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.ErrorMsgFixture = exports.TransactionResponseFixture = exports.AmountFixture = exports.RoleFixture = exports.NonDefaultPartitionIdFixture = exports.PartitionIdFixture = exports.GetContractInvalidStringFixture = exports.CouponIdFixture = exports.TransactionIdFixture = exports.ContractIdPropFixture = exports.HederaIdZeroAddressFixture = exports.AccountPropsFixture = exports.HederaIdPropsFixture = exports.EvmAddressPropsFixture = void 0;
const config_1 = require("../config");
const SecurityRole_1 = require("../../../src/domain/context/security/SecurityRole");
const BigDecimal_1 = __importDefault(require("../../../src/domain/context/shared/BigDecimal"));
const HederaId_1 = require("../../../src/domain/context/shared/HederaId");
exports.EvmAddressPropsFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => faker.string.hexadecimal({ length: 40, casing: "lower" }));
});
exports.HederaIdPropsFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => `0.0.${faker.number.int({ min: 100, max: 999 })}`);
});
exports.AccountPropsFixture = (0, config_1.createFixture)((account) => {
    account.id.as(() => new HederaId_1.HederaId(exports.HederaIdPropsFixture.create().value));
    account.evmAddress?.as(() => exports.EvmAddressPropsFixture.create().value);
});
exports.HederaIdZeroAddressFixture = (0, config_1.createFixture)((props) => {
    props.address.faker(() => "0.0.0");
});
exports.ContractIdPropFixture = (0, config_1.createFixture)((props) => {
    props.value.as(() => exports.HederaIdPropsFixture.create().value);
});
exports.TransactionIdFixture = (0, config_1.createFixture)((props) => {
    props.id.as(() => exports.HederaIdPropsFixture.create().value);
});
exports.CouponIdFixture = (0, config_1.createFixture)((props) => {
    props.id.faker((faker) => faker.number.hex({ min: 1, max: 1000 }));
});
exports.GetContractInvalidStringFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => faker.string.alpha(5));
});
exports.PartitionIdFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => `0x000000000000000000000000000000000000000000000000000000000000000${faker.number.int({ min: 1, max: 9 })}`);
});
exports.NonDefaultPartitionIdFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => `0x000000000000000000000000000000000000000000000000000000000000000${faker.number.int({ min: 2, max: 9 })}`);
});
exports.RoleFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => faker.helpers.arrayElement(Object.values(SecurityRole_1.SecurityRole)));
});
exports.AmountFixture = (0, config_1.createFixture)((props) => {
    props.value.faker((faker) => BigDecimal_1.default.fromString(faker.finance.amount({ min: 1000000, max: 10000000, dec: 0 })));
});
exports.TransactionResponseFixture = (0, config_1.createFixture)((res) => {
    res.id.as(() => exports.TransactionIdFixture.create().id);
    res.response.asConstant("1");
});
exports.ErrorMsgFixture = (0, config_1.createFixture)((props) => {
    props.msg.faker((faker) => faker.lorem.words());
});
