"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var about_lcp_seeds_exports = {};
__export(about_lcp_seeds_exports, {
  aboutLCPSeeder: () => aboutLCPSeeder
});
module.exports = __toCommonJS(about_lcp_seeds_exports);
var import_client = require("@prisma/pg/client");
const prisma = new import_client.PrismaClient();
function getCurrentUtcTime() {
  return (/* @__PURE__ */ new Date()).toISOString();
}
async function aboutLCPSeeder(company_id) {
  try {
    const user = await prisma.user.findFirst({
      where: { company_id, role: "super_admin" }
    });
    if (!user) {
      console.log(
        `AboutLCP seeder failed: admin user not available for company id ${company_id}`
      );
      return false;
    }
    const createdBy = user.id;
    const aboutLCPs = [
      {
        type: "lcp",
        name: "LCP trial video",
        description: "LCP trial video.",
        order_no: 1,
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQDAzk49XBxfQZ8HWml76LCIAUconRWZYsRjKvokks9LlWo?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=OEKIJ1",
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP introduction",
        description: "LCP introduction.",
        order_no: 2,
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQC_NVJ6nw1CSryRUOSUmNAvAV_BcUgcpSeo-ph-LZsRuuw?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=m7ehi7",
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Cron settings",
        description: "LCP - Dynamic Cron settings.",
        order_no: 3,
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQD99x1_6sxXSpiuAKDqgDUYAaGFQ87mqFC_JvzKRSWNzZY?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=Zj9CKr",
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "App version",
        description: "LCP - App version maintain document video.",
        order_no: 4,
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQBvkfDJEBkzTJmeEFo03ojnAZHgKzDvBVtg4DG76WApdM8?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=N3Dlyn",
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Document preparation",
        description: "LCP - Document How to maintain document preparation video.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQDolHUVe-elTanO9lHdzoVLAfwVIO0vPRZreWqhQOjuOBY?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=VH29Z9",
        order_no: 5,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Menu Mapping",
        description: "LCP - No code - Menu mapping with document video.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQAKuwH5cJdiR7hcRtExyPTxAX5zgLxJc3Gx8V3NaY1aQCU?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=D8fOdH",
        order_no: 6,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Child menu",
        description: "LCP - No-code child menu platform utilizing document video.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQAuV9MHv0QmRY3sFJiDAi60AYPcnPZqKFxD1O9EXBBBHc4?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=4oCrey",
        order_no: 6.1,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Grid builder",
        description: "LCP - Grid builder setup document video.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQALUPp8pdOCTJ2ypqS-9SAKARDeQt2mQgWr_QUPRk3yv3w?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=hgnZHn",
        order_no: 7,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Grid builder using SQL query",
        description: "LCP - Grid builder using SQL query.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQAFnR7ojgy0R4QuQQf2HR73AYvS8WtoH0p-zto4BW2Uz-k?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=ykAIyj",
        order_no: 7.1,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Form builder",
        description: "LCP - Form builder.",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQAJaZuW6tD0TbyDn-V5PS-bAR-6ijJnj27y-fxTVBrWFWg?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=tLfmbW",
        order_no: 8,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Form information - Form builder",
        description: "LCP - Form builder - Form information",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQCII2Pr1SqnR7iRbwUaKAiXAXsb3KhgH2AwOiUXFyAflCA?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=BuZexd",
        order_no: 8.1,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Query information - Form builder",
        description: "LCP - Form builder - Query information",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQDuAq7PnHDrQ4eAzdqBYwasARLPxohQ2NQf2oifqMySYeE?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=xUxZ0Q",
        order_no: 8.2,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Add JSON structure - Form builder",
        description: "LCP - Form builder - Add JSON structure",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQCsKvvGp4nGRrkyL8ylTKf7AUCmE3SwxL_hS5-mKdZxIkg?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=vg3qaf",
        order_no: 8.3,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Preset JSON structure - Form builder",
        description: "LCP - Form builder - Preset JSON structure",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQDTYJdLoc_kRY6gp9wo2rwCAXcENZigoXaBF2OrKXOKOaQ?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=TXdTXP",
        order_no: 8.4,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Edit JSON structure - Form builder",
        description: "LCP - Form builder - Edit JSON structure",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQCTYepi_t5JRrpQScaVxxgzATapm2s33h4vRztzNNwU1iU?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=US3Jhr",
        order_no: 8.5,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Details screen - Page builder",
        description: "LCP - Page builder - Static page details screen",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQB1fE8Q81QiTLCXZLTHfosPATDR0shlU8bnDvb5CCCG__A?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=wiOIJl",
        order_no: 9,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "Query information and Static page content - Page builder",
        description: "LCP - Page builder - Static page details screen wiht query information and static page content document",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQBHG8bzNP2IRLXCIgwhQTi1AUY0XTm9CUKzqRF2R58OUYo?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=rnQuam",
        order_no: 9.1,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Job builder",
        description: "LCP - Job builder - Records delete document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQC1rFmTfmLhQJrL-FolVzTjAf1q1OweiO2TXaA3e58pRD8?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=4bMWCH",
        order_no: 10,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Policy settings",
        description: "LCP - Policy setting document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQB6tRQO0fj9SY2TLoG_LA3OAaQQJZ8YwgTXcmV_dx-bUDM?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=zSZJ8X",
        order_no: 11,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Approval workflow",
        description: "LCP - Approval workflow and assignment document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQBaaqGtFTl4Tp7zWFgPIwwAAbJV7eAVjRCNus3JoUAtq7k?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=UHiv54",
        order_no: 12,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Approval request",
        description: "LCP - Approval request document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQDzdX1NHHFGRYPO59hjaWxxARKjVYNU7AXxsJwpy6TB1pU?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=kNmbTx",
        order_no: 12.1,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Delegation request",
        description: "LCP - Delegation request approval document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQBxwN0pvRXTTIuSnBznoaQPAQx5aDM0ZyjNbC-q_ls84qA?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=heCwfu",
        order_no: 12.2,
        documentation_pdf: "",
        documentation_word: ""
      },
      {
        type: "lcp",
        name: "LCP - Predefined custom approval tags",
        description: "LCP - Predefined custom user tags document video",
        documentation_video_url: "https://techcedenceinfosystems-my.sharepoint.com/:v:/g/personal/notifications_techcedence_com/IQAQFjwpuGXyQbhYfRjfg0MXAdEI4tBlwLsY4KywGb0Tj0Q?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJPbmVEcml2ZUZvckJ1c2luZXNzIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXciLCJyZWZlcnJhbFZpZXciOiJNeUZpbGVzTGlua0NvcHkifX0&e=DXO0t3",
        order_no: 12.3,
        documentation_pdf: "",
        documentation_word: ""
      }
    ];
    for (const aboutLCP of aboutLCPs) {
      await createOrUpdateAboutLCP(company_id, aboutLCP, createdBy);
    }
    console.log("AboutLCP seeder executed successfully.");
  } catch (error) {
    console.error(`Error in aboutLCPSeeder: ${error}`);
    throw error;
  }
}
async function createOrUpdateAboutLCP(company_id, data, createdBy) {
  const utcNow = getCurrentUtcTime();
  const existing = await prisma.aboutLCP.findFirst({
    where: {
      company_id,
      name: data.name
    }
  });
  if (!existing) {
    const newAbout = await prisma.aboutLCP.create({
      data: {
        ...data,
        company_id,
        created_by: createdBy,
        created_at: utcNow
      }
    });
    console.log(`AboutLCP created: ${newAbout.name}`);
  } else {
    await prisma.aboutLCP.update({
      where: { id: existing.id },
      data: {
        ...data
      }
    });
    console.log(`AboutLCP updated: ${existing.name}`);
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  aboutLCPSeeder
});
