import React from "react";
import { PaymentMethodHeaderPropsInterface } from "./interfaces/PaymentMethodHeaderPropsInterface";

export class PaymentMethodHeader extends React.Component<
	PaymentMethodHeaderPropsInterface,
	any
> {
	constructor(props: PaymentMethodHeaderPropsInterface) {
		super(props);
	}

	render() {
		const { label, iconSrc, iconAlt, providerLogoSrc } = this.props;

		return (
			<>
				<span className="wc-block-components-payment-method-label">
					{label}
				</span>
				{providerLogoSrc && (
					<>
						<img
							src={providerLogoSrc + '?v=1.0'}
							alt="Payment provider"
							className="simplyin-payment-provider-logo"
						/>
					</>
				)}
			</>
		);
	}
}
