from rest_framework import serializers
from .models import SiteConfiguration


class SiteConfigurationAdminSerializer(serializers.ModelSerializer):
	class Meta:
		model = SiteConfiguration
		fields = [
			"id",
			"name",
			"logo",
			"favicon",
			"contact_email",
			"contact_phone",
			"contact_address",
			"opening_hours",
			"facebook_url",
			"instagram_url",
			"youtube_url",
			"tiktok_url",
			"whatsapp_number",
			"zasilkovna_shipping_price",
			"zasilkovna_api_key",
			"zasilkovna_api_password",
			"free_shipping_over",
			"multiplying_coupons",
			"addition_of_coupons_amount",
			"currency",
		]


class SiteConfigurationPublicSerializer(serializers.ModelSerializer):
	class Meta:
		model = SiteConfiguration
		# Expose only non-sensitive fields
		fields = [
			"id",
			"name",
			"logo",
			"favicon",
			"contact_email",
			"contact_phone",
			"contact_address",
			"opening_hours",
			"facebook_url",
			"instagram_url",
			"youtube_url",
			"tiktok_url",
			# Exclude API keys/passwords
			"zasilkovna_shipping_price",
			"free_shipping_over",
			"currency",
		]

