/* eslint-disable @next/next/no-img-element */
'use client';
import React from 'react';
import DOMPurify from 'dompurify';
import { useSettingsStore } from '../lib/store/settingsStore';
const DEFAULT_ENAMAD_HTML = ``;
export default function EnamadBadge() {
const getText = useSettingsStore((state) => state.getText);
const enamadHtml = getText('ENAMAD_HTML_CODE', DEFAULT_ENAMAD_HTML);
const cleanEnamadHtml =
typeof window !== 'undefined'
? DOMPurify.sanitize(enamadHtml, {
ALLOWED_TAGS: ['a', 'img'],
ALLOWED_ATTR: ['referrerpolicy', 'target', 'href', 'src', 'alt', 'style', 'code', 'width', 'height'],
})
: enamadHtml;
return (
صادر شده توسط مرکز توسعه تجارت الکترونیکی (وزارت صمت)