export default defineEventHandler(async (event) => { try { // TODO: Implement proper notification templates table // For now, returning mock data since notification tables don't exist in current schema const mockTemplates = [ { label: "Welcome Email", value: "welcome_email", subject: "Welcome to our platform!", content: "
Thank you for joining us.
", pushTitle: "Welcome!", pushBody: "Welcome to our platform, {{first_name}}!", variables: ["first_name", "last_name"] }, { label: "Password Reset", value: "password_reset", subject: "Reset your password", content: "Click the link to reset your password.
", pushTitle: "Password Reset", pushBody: "Tap to reset your password", variables: ["reset_link"] }, { label: "Order Confirmation", value: "order_confirmation", subject: "Order Confirmation #{{order_id}}", content: "Your order #{{order_id}} has been confirmed.
", pushTitle: "Order Confirmed!", pushBody: "Your order #{{order_id}} is confirmed", variables: ["order_id", "order_total"] } ]; return { success: true, data: mockTemplates } } catch (error) { console.error('Error fetching templates:', error) throw createError({ statusCode: 500, statusMessage: 'Failed to fetch templates' }) } })