import { v4 as uuid } from 'uuid'; import type { BlockType, ContentBlock } from '$lib/types'; export const blockLabels: Record = { text: 'Text', image_text: 'Image + Text', timeline: 'Timeline', hero: 'Hero', button: 'Button', spacer: 'Spacer', testimonials: 'Testimonials', upcoming_calendar: 'Upcoming Calendar' }; export const blockTypes = Object.keys(blockLabels) as BlockType[]; export function createBlock(type: BlockType): ContentBlock { const base = { id: uuid(), type, data: {} as Record }; switch (type) { case 'text': base.data = { content: '

New text block

Add your copy here.

' }; break; case 'image_text': base.data = { url: '', alt: '', content: '

Image and text

Add content here.

', imagePosition: 'left' }; break; case 'timeline': base.data = { items: [{ title: 'Milestone', description: 'Describe this moment.' }] }; break; case 'hero': base.data = { heading: 'Holistic and Experiential Learning about Happiness', subheading: 'Individual sessions, workshops and events in Oslo', buttonLabel: 'BOOK NOW', buttonUrl: '/book' }; break; case 'button': base.data = { label: 'Learn More', href: '/', variant: 'primary', size: 'md', alignment: 'center' }; break; case 'spacer': base.data = { height: 64 }; break; case 'testimonials': base.data = { title: 'What They Say About Me', items: [ { text: 'Recently I started to experience incredible whole-body orgasms. And now I know how it works. My awareness around sexuality changed for good and I feel like a boss of my own life. What a joy to have this freedom of choice.', title: 'Anne' }, { text: 'I never thought it was possible to sense so much pleasure in my body without intense stimulations I got used to. After the series of sessions, I could feel something like a trance state by receiving only a gentle touch. That was a totally new experience for me.', title: 'Espen' }, { text: "Eva's sexual healing methods should be accessible to everyone. I am amazed by the depth and integrity of the message she conveys through her work. I was meeting Eva for healing my body and, as a result, I reconnected with my heart and soul too.", title: 'Marie' }, { text: "It is hard to surprise me with any sexual activity since I had many exciting experiments in my life. But I always suspected that there might be something more I have not yet felt and tried. Thanks to Eva I realised how much power I've got. Under her guidance, I have learnt to maximise my orgasmic potential and consciously play with arousal. By the way, my wife is also happy that I became enthusiastic about new sexual practices.", title: 'Jan' } ] }; break; case 'upcoming_calendar': base.data = { title: 'Upcoming Events', categories: [] }; break; } base.data._background = { type: 'none', color: '', attachment: 'scroll', overlay: false, overlayOpacity: 40 }; return base; }