// SPDX-License-Identifier: Apache-2.0
import { createFixture } from "../config";
import { HederaIdPropsFixture, PartitionIdFixture } from "../shared/DataFixture";
export const CreateHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.escrowId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationDate.faker((faker) => faker.date.future().getTime().toString());
});
export const CreateHoldFromByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.escrowId.as(() => HederaIdPropsFixture.create().value);
    request.sourceId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationDate.faker((faker) => faker.date.future().getTime().toString());
});
export const ControllerCreateHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.escrowId.as(() => HederaIdPropsFixture.create().value);
    request.sourceId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationDate.faker((faker) => faker.date.future().getTime().toString());
});
export const ProtectedCreateHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.escrowId.as(() => HederaIdPropsFixture.create().value);
    request.sourceId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.expirationDate.faker((faker) => faker.date.future().getTime().toString());
    request.deadline.faker((faker) => faker.date.future().getTime().toString());
    request.nonce.faker((faker) => faker.number.int({ min: 0, max: 1000 }).toString());
    request.signature.faker((faker) => faker.string.hexadecimal({ length: 64, prefix: "0x" }));
});
export const GetHeldAmountForRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHeldAmountForByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHoldCountForByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHoldsIdForByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.start.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    request.end.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
export const GetHoldForByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.holdId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
export const ReleaseHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.holdId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
});
export const ReclaimHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.holdId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
export const ExecuteHoldByPartitionRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.sourceId.as(() => HederaIdPropsFixture.create().value);
    request.amount.faker((faker) => faker.number.int({ min: 1, max: 10 }).toString());
    request.partitionId.as(() => PartitionIdFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.holdId.faker((faker) => faker.number.int({ min: 1, max: 10 }));
});
export const HoldDetailsFixture = createFixture((props) => {
    props.amount.faker((faker) => BigInt(faker.number.int({ max: 999 })));
    props.expirationTimeStamp.faker((faker) => faker.date.future().getTime());
    props.escrowAddress.as(() => HederaIdPropsFixture.create().value);
    props.tokenHolderAddress.as(() => HederaIdPropsFixture.create().value);
    props.destinationAddress.as(() => HederaIdPropsFixture.create().value);
    props.data.faker((faker) => faker.lorem.words());
    props.operatorData.faker((faker) => faker.lorem.words());
});
export const GetHeldAmountForQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHeldAmountForByPartitionQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.partitionId.as(() => PartitionIdFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHoldCountForByPartitionQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.partitionId.as(() => PartitionIdFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetHoldForByPartitionQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.partitionId.as(() => PartitionIdFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
    query.holdId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
export const GetHoldsIdForByPartitionQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.partitionId.as(() => PartitionIdFixture.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 CreateHoldCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
    command.partitionId.as(() => PartitionIdFixture.create().value);
    command.escrowId.as(() => HederaIdPropsFixture.create().value);
    command.targetId.as(() => HederaIdPropsFixture.create().value);
    command.amount.faker((faker) => faker.number.int({ min: 1, max: 999 }).toString());
    command.sourceId.as(() => HederaIdPropsFixture.create().value);
    command.targetId.as(() => HederaIdPropsFixture.create().value);
    command.expirationDate.faker((faker) => faker.date.future().getTime().toString());
    command.deadline.faker((faker) => faker.date.future().getTime().toString());
    command.nonce.faker((faker) => faker.number.int({ min: 0, max: 1000 }));
    command.signature.faker((faker) => faker.string.hexadecimal({ length: 64, prefix: "0x" }));
});
export const HandleHoldCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
    command.sourceId.as(() => HederaIdPropsFixture.create().value);
    command.partitionId.as(() => PartitionIdFixture.create().value);
    command.targetId.as(() => HederaIdPropsFixture.create().value);
    command.holdId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    command.amount.faker((faker) => faker.number.int({ min: 1, max: 999 }).toString());
});
