-- Create site_settings table for menu and other site configurations
CREATE TABLE IF NOT EXISTS site_settings (
  key TEXT PRIMARY KEY,
  settings JSONB NOT NULL,
  createdat TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updatedat TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Insert default menu items
INSERT INTO site_settings (key, settings) 
VALUES ('menu', '{"items":[
  {"label":"Home","url":"/home.html","icon":"bi-house","visible":true},
  {"label":"Shop","url":"/shop.html","icon":"bi-shop","visible":true},
  {"label":"Portfolio","url":"/portfolio.html","icon":"bi-images","visible":true},
  {"label":"About","url":"/about.html","icon":"bi-info-circle","visible":true},
  {"label":"Blog","url":"/blog.html","icon":"bi-journal-text","visible":true},
  {"label":"Contact","url":"/contact.html","icon":"bi-envelope","visible":true}
]}')
ON CONFLICT (key) DO NOTHING;
