// SPDX-License-Identifier: Apache-2.0
import { createFixture } from "../config";
import { HederaId } from "../../../src/domain/context/shared/HederaId";
import { HederaIdPropsFixture } from "../shared/DataFixture";
import BigDecimal from "../../../src/domain/context/shared/BigDecimal";
export const GetLockQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
    query.id.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
export const LockCountQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const LockedBalanceOfQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const LocksIdQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => 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 }));
});
export const LockCommandFixture = createFixture((command) => {
    command.amount.faker((faker) => faker.number.int({ min: 1, max: 1000 }).toString());
    command.sourceId.as(() => HederaIdPropsFixture.create().value);
    command.expirationDate.faker((faker) => faker.date.future().getTime().toString());
    command.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const ReleaseCommandFixture = createFixture((command) => {
    command.lockId.faker((faker) => faker.number.int({ min: 1, max: 1000 }));
    command.sourceId.as(() => HederaIdPropsFixture.create().value);
    command.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const LockRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationTimestamp.faker((faker) => faker.date.future().getTime().toString());
});
export const ReleaseRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.lockId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
export const GetLockedBalanceRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(HederaIdPropsFixture.create().value));
});
export const GetLockCountRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(HederaIdPropsFixture.create().value));
});
export const GetLocksIdRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(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 }));
});
export const GetLockRequestFixture = createFixture((request) => {
    request.securityId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.targetId.as(() => new HederaId(HederaIdPropsFixture.create().value));
    request.id.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const LockFixture = createFixture((props) => {
    props.id.as(() => new HederaId(HederaIdPropsFixture.create().value));
    props.amount.faker((faker) => new BigDecimal(BigInt(faker.number.int({ max: 999 })).toString()));
    props.expiredTimestamp.faker((faker) => BigInt(faker.date.future().getTime()));
});
