-- Create site_content table for managing section content
CREATE TABLE IF NOT EXISTS site_content (
    id INT AUTO_INCREMENT PRIMARY KEY,
    section VARCHAR(100) UNIQUE NOT NULL,
    content TEXT NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

-- Insert default content for TOA Wellness Wheel section
INSERT INTO site_content (section, content) VALUES 
('toa_wheel_title', 'TOA Wellness Wheel – Business & Financial Empowerment'),
('toa_wheel_description', 'Your membership goes beyond wellness—we empower your business growth, financial stability, and long-term prosperity through comprehensive professional services and strategic guidance.')
ON DUPLICATE KEY UPDATE 
content = VALUES(content);

-- Add description and icon columns to toa_wheel_services if they don't exist
ALTER TABLE toa_wheel_services 
ADD COLUMN IF NOT EXISTS description TEXT,
ADD COLUMN IF NOT EXISTS icon VARCHAR(100);

-- Update existing services with descriptions and icons
UPDATE toa_wheel_services SET 
    description = CASE 
        WHEN service_name = 'Business Coaching' THEN 'Strategic business guidance and growth planning'
        WHEN service_name = 'Notary & Loan Signing' THEN 'Professional notary and document signing services'
        WHEN service_name = 'Crypto & Commodities' THEN 'Cryptocurrency and commodities trading guidance'
        WHEN service_name = 'Tax & Bookkeeping' THEN 'Tax preparation and bookkeeping services'
        WHEN service_name = 'IT Solutions' THEN 'Technology solutions and IT support'
        WHEN service_name = 'Estate Planning' THEN 'Comprehensive estate planning services'
        WHEN service_name = 'Business Branding' THEN 'Brand development and marketing solutions'
        WHEN service_name = 'Real Estate Services' THEN 'Real estate consultation and services'
        ELSE description
    END,
    icon = CASE 
        WHEN service_name = 'Business Coaching' THEN 'fas fa-building'
        WHEN service_name = 'Notary & Loan Signing' THEN 'fas fa-shield-alt'
        WHEN service_name = 'Crypto & Commodities' THEN 'fas fa-chart-line'
        WHEN service_name = 'Tax & Bookkeeping' THEN 'fas fa-calculator'
        WHEN service_name = 'IT Solutions' THEN 'fas fa-laptop'
        WHEN service_name = 'Estate Planning' THEN 'fas fa-file-alt'
        WHEN service_name = 'Business Branding' THEN 'fas fa-palette'
        WHEN service_name = 'Real Estate Services' THEN 'fas fa-home'
        ELSE icon
    END
WHERE description IS NULL OR icon IS NULL;