Files
ipal-kit/src/globals/CookieSettings/index.ts
T

22 lines
516 B
TypeScript

import type { GlobalConfig } from 'payload'
import { cookieSettingsFields } from './fields.js'
/**
* Builds the CookieSettings global — consent banner copy managed by editors.
* Public read (the banner needs it on the frontend for anonymous visitors).
*/
export function buildCookieSettings(): GlobalConfig {
return {
slug: 'cookie-settings',
access: {
read: () => true,
},
admin: {
group: 'Settings',
},
fields: cookieSettingsFields,
label: 'Cookie Settings',
}
}