"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SliderSeedService = void 0;
const common_1 = require("@nestjs/common");
const typeorm_1 = require("@nestjs/typeorm");
const slider_entity_1 = require("../../../slider/entities/slider.entity");
const typeorm_2 = require("typeorm");
const crypto_1 = require("crypto");
let SliderSeedService = class SliderSeedService {
    constructor(sliderRepository) {
        this.sliderRepository = sliderRepository;
    }
    async run() {
        console.log("Seeding sliders ...");
        await this.sliderRepository.delete({});
        const sliders = [
            {
                id: (0, crypto_1.randomUUID)(),
                name: "Industrial computer",
                description: "Industrial computer",
                image: { path: "https://media.licdn.com/dms/image/C4D1BAQH92cG_YobUjw/company-background_10000/0/1593012526419/int_technics_cover?e=2147483647&v=beta&t=YHYMtx3RAMAsEzIKmtw09v8wLpJIt89mysQZLU77ByE" },
            },
            {
                id: (0, crypto_1.randomUUID)(),
                name: "Industrial monitor",
                description: "Industrial monitor",
                image: { path: "https://ce8dc832c.cloudimg.io/cdn/n/n@50a6370bd72d36e72510a166a6ef4a0ee1a50bb5/_cs_/2019/04/5ca59f4ec55d6/tme_edu_landing.jpg" },
            },
            {
                id: (0, crypto_1.randomUUID)(),
                name: "Industrial panel PC",
                description: "Industrial panel PC",
                image: { path: "https://wiautomation.anticipa.io/public/uploads/parcop/image/cms/08_09_2022_19_23_45_home_bg_image.webp" },
            },
            {
                id: (0, crypto_1.randomUUID)(),
                name: "Industrial tablet",
                description: "Industrial tablet",
                image: { path: "https://avsuwzdjuo.cloudimg.io/v7/_cs_/2020/04/5ea805c689191/2.jpg?w=971&h=373&org_if_sml=1&func=crop" },
            },
        ];
        await this.sliderRepository.save(sliders);
        console.log("Seeding sliders completed!");
    }
};
exports.SliderSeedService = SliderSeedService;
exports.SliderSeedService = SliderSeedService = __decorate([
    (0, common_1.Injectable)(),
    __param(0, (0, typeorm_1.InjectRepository)(slider_entity_1.Slider)),
    __metadata("design:paramtypes", [typeorm_2.Repository])
], SliderSeedService);
//# sourceMappingURL=slider-seed.service.js.map