-- ============================================================
-- TabataFit Seed Data
-- ============================================================
-- Run this SQL in Supabase SQL Editor to populate your database with sample data

-- Sample Trainers
INSERT INTO public.trainers (name, specialty, color, workout_count) VALUES
  ('Sarah Chen', 'HIIT & Cardio', '#FF6B35', 12),
  ('Marcus Johnson', 'Strength Training', '#5AC8FA', 8),
  ('Elena Rodriguez', 'Yoga & Mobility', '#30D158', 15),
  ('David Kim', 'Full Body Conditioning', '#FF9500', 10);

-- Sample Collections
INSERT INTO public.collections (title, description, icon, gradient) VALUES
  ('Quick Burns', 'High-intensity workouts under 10 minutes', 'flame', ARRAY['#FF6B35', '#FF9500']),
  ('Core Strength', 'Build a solid foundation', 'shield', ARRAY['#5AC8FA', '#30D158']),
  ('Cardio Blast', 'Get your heart pumping', 'heart', ARRAY['#FF6B35', '#FF3B30']),
  ('Total Body', 'Full body workouts for maximum results', 'body', ARRAY['#30D158', '#5856D6']);

-- Note: Workouts will be added after trainers are created (they reference trainer_ids)
-- To add workouts, first note the UUIDs generated for trainers above, then:

-- Sample Workout (uncomment and update trainer_id after running above)
-- INSERT INTO public.workouts (
--   title, trainer_id, category, level, duration, calories, rounds,
--   prep_time, work_time, rest_time, equipment, music_vibe, exercises, is_featured
-- ) VALUES (
--   'Morning Ignite',
--   'PASTE_TRAINER_UUID_HERE',
--   'full-body',
--   'Beginner',
--   4,
--   45,
--   8,
--   10,
--   20,
--   10,
--   ARRAY['yoga-mat'],
--   'electronic',
--   '[{"name": "Jumping Jacks", "duration": 20}, {"name": "Push-ups", "duration": 20}, {"name": "Squats", "duration": 20}, {"name": "Plank", "duration": 20}]'::jsonb,
--   true
-- );

-- Update trainer workout counts
UPDATE public.trainers SET workout_count = 12 WHERE name = 'Sarah Chen';
UPDATE public.trainers SET workout_count = 8 WHERE name = 'Marcus Johnson';
UPDATE public.trainers SET workout_count = 15 WHERE name = 'Elena Rodriguez';
UPDATE public.trainers SET workout_count = 10 WHERE name = 'David Kim';

-- Verify data
SELECT * FROM public.trainers ORDER BY name;
SELECT * FROM public.collections ORDER BY title;