"use strict";
/**
 * List Page Template
 *
 * Generates the list page for the module at [locale]/(main)/(features)/{plural}/page.tsx
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateListPageTemplate = generateListPageTemplate;
/**
 * Generate the list page file content
 *
 * @param data - Frontend template data
 * @returns Generated file content
 */
function generateListPageTemplate(data) {
    const { names } = data;
    return `import ${names.pascalCase}ListContainer from "@/features/${data.importTargetDir}/${names.kebabCase}/components/containers/${names.pascalCase}ListContainer";
import { ${names.pascalCase}Provider } from "@/features/${data.importTargetDir}/${names.kebabCase}/contexts/${names.pascalCase}Context";
import { PageContainer } from "@carlonicora/nextjs-jsonapi/components";
import { Modules } from "@carlonicora/nextjs-jsonapi/core";
import { Action } from "@carlonicora/nextjs-jsonapi/core";
import { ServerSession } from "@carlonicora/nextjs-jsonapi/server";

export default async function ${names.pluralPascal}ListPage() {
  await ServerSession.checkPermission({ module: Modules.${names.pascalCase}, action: Action.Read });

  return (
    <${names.pascalCase}Provider>
      <PageContainer testId="page-${names.pluralKebab}-container">
        <${names.pascalCase}ListContainer />
      </PageContainer>
    </${names.pascalCase}Provider>
  );
}
`;
}
//# sourceMappingURL=list-page.template.js.map