<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class HeaderFooterSetting extends Model
{
    use HasFactory;

    protected $fillable = [
        'header_bg_color',
        'header_text_color',
        'header_link_color',
        'header_link_hover_color',
        'logo_text',
        'logo_image',
        'footer_bg_color',
        'footer_text_color',
        'footer_heading_color',
        'footer_link_color',
        'footer_link_hover_color',
        'footer_description',
        'footer_copyright',
        'phone',
        'email',
        'address',
        'social_instagram',
        'social_telegram',
        'social_whatsapp',
    ];

    /**
     * Get logo URL
     */
    public function getLogoUrlAttribute()
    {
        if ($this->logo_image) {
            return asset('storage/' . $this->logo_image);
        }
        return null;
    }
}
