import { JSX } from '@redneckz/uni-jsx';
import { type Picture } from '../../model/Picture';
import { Text } from '../../ui-kit/Text/Text';
import { renderLinkInput } from './renderLinkInput';

type ResultLinkProps = {
  link: string;
  copyIcon?: Picture;
};

export const ResultLink = JSX<ResultLinkProps>(({ link, copyIcon }) => {
  return (
    <div>
      <div className="@xl:text-center @xl:col-span-2 mb-m">
        <Text size="text-h6">Скопируйте ссылку и отправьте другу</Text>
      </div>
      {renderLinkInput({
        value: link,
        copyIcon,
      })}
    </div>
  );
});
