/**
 * Swift Commerce Icon Component
 * 
 * Custom branded icon for Swift Commerce using favicon.png
 */

interface SwiftCommerceIconProps {
  className?: string
}

// Get plugin URL from WordPress data
const getPluginUrl = () => {
  return window.swiftCommerceData?.pluginUrl || '/wp-content/plugins/swift-commerce/'
}

export function SwiftCommerceIcon({ className }: SwiftCommerceIconProps) {
  return (
    <img 
      src={`${getPluginUrl()}assets/img/favicon.png`}
      alt="Swift Commerce"
      className={className}
    />
  )
}

// Simplified version for small sizes (sidebar, favicon) - same as main icon
export function SwiftCommerceIconSimple({ className }: SwiftCommerceIconProps) {
  return (
    <img 
      src={`${getPluginUrl()}assets/img/favicon.png`}
      alt="Swift Commerce"
      className={className}
    />
  )
}

// WordPress icon (color version) for dropdowns/menus
export function WordPressColorIcon({ className }: SwiftCommerceIconProps) {
  return (
    <img 
      src={`${getPluginUrl()}assets/img/icons/wordpress-color.png`}
      alt="WordPress"
      className={className}
    />
  )
}

// WordPress icon (white version) for dark backgrounds
export function WordPressWhiteIcon({ className }: SwiftCommerceIconProps) {
  return (
    <img 
      src={`${getPluginUrl()}assets/img/icons/wordpress-white.png`}
      alt="WordPress"
      className={className}
    />
  )
}

export default SwiftCommerceIcon
