-- Seed data for MySQL (3 muscles, 3 equipment, 6 exercises)

INSERT IGNORE INTO muscle_groups (name, slug, description, image_url) VALUES
  ('Abs', 'abs', 'Core-focused movements that build abdominal strength and stability.', 'https://images.unsplash.com/photo-1599058917212-d750089bc07e?auto=format&fit=crop&w=900&q=60'),
  ('Biceps', 'biceps', 'Exercises that target the front of the upper arm for size and strength.', 'https://images.unsplash.com/photo-1594381898411-846e7d193883?auto=format&fit=crop&w=900&q=60'),
  ('Chest', 'chest', 'Pressing and fly variations to build the pectorals and upper body power.', 'https://images.unsplash.com/photo-1517836357463-d25dfeac3438?auto=format&fit=crop&w=900&q=60');

INSERT IGNORE INTO equipment (name, slug) VALUES
  ('Bodyweight', 'bodyweight'),
  ('Dumbbell', 'dumbbell'),
  ('Cable Machine', 'cable');

-- ABS
INSERT IGNORE INTO exercises
  (title, slug, muscle_group_id, equipment_id, difficulty, instructions_json, video_url, target_images_json)
VALUES
(
  'Cable Crunch',
  'cable-crunch',
  (SELECT id FROM muscle_groups WHERE slug='abs' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='cable' LIMIT 1),
  'Intermediate',
  JSON_ARRAY(
    'Attach a rope to a high pulley and kneel facing the machine.',
    'Hold the rope by your temples and brace your core.',
    'Crunch your torso down by flexing your abs (do not pull with arms).',
    'Pause briefly, then return under control.'
  ),
  'https://www.youtube.com/watch?v=dummy-cable-crunch',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1599058917212-d750089bc07e?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('rectus_abdominis','obliques')
  )
),
(
  'Hanging Knee Raise',
  'hanging-knee-raise',
  (SELECT id FROM muscle_groups WHERE slug='abs' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='bodyweight' LIMIT 1),
  'Beginner',
  JSON_ARRAY(
    'Hang from a pull-up bar with a firm grip.',
    'Tuck your pelvis slightly and brace your core.',
    'Raise your knees toward your chest without swinging.',
    'Lower slowly to a dead hang and repeat.'
  ),
  'https://www.youtube.com/watch?v=dummy-hanging-knee-raise',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1526401485004-2aa7b7b73391?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('lower_abs','hip_flexors')
  )
);

-- BICEPS
INSERT IGNORE INTO exercises
  (title, slug, muscle_group_id, equipment_id, difficulty, instructions_json, video_url, target_images_json)
VALUES
(
  'Dumbbell Curl',
  'dumbbell-curl',
  (SELECT id FROM muscle_groups WHERE slug='biceps' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='dumbbell' LIMIT 1),
  'Beginner',
  JSON_ARRAY(
    'Stand tall with dumbbells at your sides, palms facing forward.',
    'Curl the weights up while keeping elbows close to your torso.',
    'Squeeze at the top without shrugging.',
    'Lower under control until arms are fully extended.'
  ),
  'https://www.youtube.com/watch?v=dummy-dumbbell-curl',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1593079831268-3381b0db4a77?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('biceps_brachii','brachialis')
  )
),
(
  'Hammer Curl',
  'hammer-curl',
  (SELECT id FROM muscle_groups WHERE slug='biceps' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='dumbbell' LIMIT 1),
  'Intermediate',
  JSON_ARRAY(
    'Hold dumbbells with a neutral grip (palms facing each other).',
    'Curl the weights up without rotating the wrists.',
    'Keep shoulders down and elbows pinned.',
    'Lower slowly and repeat.'
  ),
  'https://www.youtube.com/watch?v=dummy-hammer-curl',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1583454110551-21f2fa2afe61?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('brachialis','forearms')
  )
);

-- CHEST
INSERT IGNORE INTO exercises
  (title, slug, muscle_group_id, equipment_id, difficulty, instructions_json, video_url, target_images_json)
VALUES
(
  'Push-Up',
  'push-up',
  (SELECT id FROM muscle_groups WHERE slug='chest' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='bodyweight' LIMIT 1),
  'Beginner',
  JSON_ARRAY(
    'Place hands slightly wider than shoulder-width on the floor.',
    'Brace your core and keep a straight line from head to heels.',
    'Lower until your chest is close to the ground.',
    'Press back up while keeping elbows at about a 45° angle.'
  ),
  'https://www.youtube.com/watch?v=dummy-push-up',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1598971457999-ca4ef48a9a71?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('pectoralis_major','triceps')
  )
),
(
  'Cable Fly',
  'cable-fly',
  (SELECT id FROM muscle_groups WHERE slug='chest' LIMIT 1),
  (SELECT id FROM equipment WHERE slug='cable' LIMIT 1),
  'Advanced',
  JSON_ARRAY(
    'Set cables to chest height and step forward into a split stance.',
    'With a slight bend in elbows, bring handles together in front of you.',
    'Squeeze your chest at peak contraction.',
    'Return slowly until you feel a stretch across the pecs.'
  ),
  'https://www.youtube.com/watch?v=dummy-cable-fly',
  JSON_OBJECT(
    'thumbnail','https://images.unsplash.com/photo-1517963879433-6ad2b056d712?auto=format&fit=crop&w=600&q=60',
    'targets', JSON_ARRAY('chest','anterior_delts')
  )
);

