import type { GlobalConfig } from 'payload' import { adminOnly } from '../access/adminOnly' export const SiteSettings: GlobalConfig = { slug: 'site-settings', label: 'Webbplatsinställningar', access: { update: adminOnly, read: () => true, }, fields: [ { name: 'headerCodeInjection', type: 'group', label: 'Kodinjektion (Head)', fields: [ { name: 'enabled', type: 'checkbox', label: 'Aktivera kodinjektion i ', defaultValue: false, }, { name: 'code', type: 'code', label: 'Kod att injicera i ', admin: { language: 'html', condition: (_, siblingData) => Boolean(siblingData?.enabled), description: 'Klistra in