import { Internet } from '@pawel-up/data-mock/Internet.js';
import { Types } from '@pawel-up/data-mock/Types.js';
export class Authorization {
    types;
    internet;
    constructor(init = {}) {
        this.types = new Types(init.seed);
        this.internet = new Internet(init);
    }
    /**
     * Generates random Basic authorization object.
     */
    basic() {
        const result = {
            _id: `basic/${this.types.string()}`,
            username: this.internet.userName(),
            password: this.types.hash(),
        };
        return result;
    }
    /**
     * Generates basic authorization data
     *
     * @param size Number of items to generate. Default to 25.
     * @return List of datastore entries.
     */
    basicList(size = 25) {
        const result = [];
        for (let i = 0; i < size; i++) {
            result.push(this.basic());
        }
        return result;
    }
}
//# sourceMappingURL=Authorization.js.map