// SPDX-License-Identifier: Apache-2.0
import { createFixture } from "../config";
import { HederaIdPropsFixture } from "../shared/DataFixture";
export const ActivateInternalKycCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycAccountsCountQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const DeactivateInternalKycCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycAccountsDataQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    query.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
export const IsInternalKycActivatedQueryFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycForQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GrantKycRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
    request.vcBase64.faker((faker) => Buffer.from(faker.lorem.paragraph()).toString("base64"));
});
export const RevokeKycRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycForRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycAccountsCountRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const GetKycAccountsDataRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    request.start.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    request.end.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const GetKycStatusForRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
    request.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const ActivateInternalKycRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const GetKycStatusForQueryFixture = createFixture((query) => {
    query.securityId.as(() => HederaIdPropsFixture.create().value);
    query.targetId.as(() => HederaIdPropsFixture.create().value);
});
export const KycAccountDataFixture = createFixture((props) => {
    props.account.as(() => HederaIdPropsFixture.create().value);
    props.validFrom.faker((faker) => faker.date.past());
    props.validTo.faker((faker) => faker.date.future());
    props.vcId.as(() => HederaIdPropsFixture.create().value);
    props.issuer.as(() => HederaIdPropsFixture.create().value);
    props.status.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const DeactivateInternalKycRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const IsInternalKycActivatedRequestFixture = createFixture((request) => {
    request.securityId.as(() => HederaIdPropsFixture.create().value);
});
export const KycFixture = createFixture((props) => {
    props.validFrom.faker((faker) => faker.date.past().getTime().toString());
    props.validTo.faker((faker) => faker.date.future().getTime().toString());
    props.vcId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.issuer.as(() => HederaIdPropsFixture.create().value);
    props.status.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
export const GrantKycCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
    command.targetId.as(() => HederaIdPropsFixture.create().value);
    command.vcBase64.faker((faker) => faker.string.alphanumeric);
});
export const SignedCredentialFixture = createFixture((credential) => {
    credential.id.faker((faker) => faker.string.uuid());
    let validFrom;
    credential.validFrom?.faker((faker) => {
        validFrom = faker.date.future();
        return validFrom.getTime().toString();
    });
    credential.validUntil?.faker((faker) => faker.date.future({ refDate: validFrom }).getTime().toString());
});
export const RevokeKycCommandFixture = createFixture((command) => {
    command.securityId.as(() => HederaIdPropsFixture.create().value);
    command.targetId.as(() => HederaIdPropsFixture.create().value);
});
