-- Baltique OS visual system 2.16.0
-- Three official themes: Lavender Sunrise, Lavender Mint and Dark.

UPDATE users SET preferred_theme='mint' WHERE preferred_theme='light';
UPDATE enterprise_ui_theme_preferences SET theme_key='mint' WHERE theme_key='light';

INSERT INTO enterprise_ui_theme_policies
(theme_key,label_pl,label_en,status,is_default,created_at,updated_at)
VALUES
('sunrise','Lawendowy wschód słońca','Lavender Sunrise','active',1,NOW(),NOW()),
('mint','Lawendowa mięta','Lavender Mint','active',0,NOW(),NOW()),
('dark','Ciemny','Dark','active',0,NOW(),NOW())
ON DUPLICATE KEY UPDATE
label_pl=VALUES(label_pl),label_en=VALUES(label_en),status='active',is_default=VALUES(is_default),updated_at=NOW();

UPDATE enterprise_ui_theme_policies SET status='legacy',is_default=0,updated_at=NOW() WHERE theme_key='light';

INSERT INTO app_settings(setting_key,setting_value,created_at,updated_at) VALUES
('official_default_theme','sunrise',NOW(),NOW()),
('official_supported_themes','sunrise,mint,dark',NOW(),NOW()),
('enterprise_theme_version','2.16.0',NOW(),NOW()),
('enterprise_lavender_sunrise_version','2.16.0',NOW(),NOW())
ON DUPLICATE KEY UPDATE setting_value=VALUES(setting_value),updated_at=NOW();
