"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.LockFixture = exports.GetLockRequestFixture = exports.GetLocksIdRequestFixture = exports.GetLockCountRequestFixture = exports.GetLockedBalanceRequestFixture = exports.ReleaseRequestFixture = exports.LockRequestFixture = exports.ReleaseCommandFixture = exports.LockCommandFixture = exports.LocksIdQueryFixture = exports.LockedBalanceOfQueryFixture = exports.LockCountQueryFixture = exports.GetLockQueryFixture = void 0;
const config_1 = require("../config");
const HederaId_1 = require("../../../src/domain/context/shared/HederaId");
const DataFixture_1 = require("../shared/DataFixture");
const BigDecimal_1 = __importDefault(require("../../../src/domain/context/shared/BigDecimal"));
exports.GetLockQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.id.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.LockCountQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.LockedBalanceOfQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.LocksIdQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.LockCommandFixture = (0, config_1.createFixture)((command) => {
    command.amount.faker((faker) => faker.number.int({ min: 1, max: 1000 }).toString());
    command.sourceId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.expirationDate.faker((faker) => faker.date.future().getTime().toString());
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.ReleaseCommandFixture = (0, config_1.createFixture)((command) => {
    command.lockId.faker((faker) => faker.number.int({ min: 1, max: 1000 }));
    command.sourceId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.LockRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationTimestamp.faker((faker) => faker.date.future().getTime().toString());
});
exports.ReleaseRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.lockId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
exports.GetLockedBalanceRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetLockCountRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
});
exports.GetLocksIdRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.start.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    request.end.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.GetLockRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    request.id.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.LockFixture = (0, config_1.createFixture)((props) => {
    props.id.as(() => new HederaId_1.HederaId(DataFixture_1.HederaIdPropsFixture.create().value));
    props.amount.faker((faker) => new BigDecimal_1.default(BigInt(faker.number.int({ max: 999 })).toString()));
    props.expiredTimestamp.faker((faker) => BigInt(faker.date.future().getTime()));
});
