import { Types } from '@pawel-up/data-mock/Types.js';
import { Internet } from '@pawel-up/data-mock/Internet.js';
import { Lorem } from '@pawel-up/data-mock/Lorem.js';
export class HostRules {
    types;
    lorem;
    internet;
    constructor(init = {}) {
        this.types = new Types(init.seed);
        this.lorem = new Lorem(init);
        this.internet = new Internet(init);
    }
    /**
     * Generates random host rule data object.
     */
    rule() {
        const result = {
            key: this.types.string(21),
            from: this.internet.uri(),
            to: this.internet.uri(),
            enabled: this.types.boolean(),
            comment: this.lorem.paragraph(),
        };
        return result;
    }
    /**
     * Generates a list of host rules.
     *
     * @param size Number of items to generate. Default to 25.
     * @return List of datastore entries.
     */
    rules(size = 25) {
        const result = [];
        for (let i = 0; i < size; i++) {
            result.push(this.rule());
        }
        return result;
    }
}
//# sourceMappingURL=HostRules.js.map