"use client"
import { useIntl } from "react-intl"

import { Button } from "@scandic-hotels/design-system/Button"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"

export function AddToCalendarButton({ onPress }: { onPress: () => void }) {
  const intl = useIntl()

  return (
    <Button
      variant="Text"
      size="Small"
      color="Primary"
      wrapping
      typography="Body/Supporting text (caption)/smBold"
      onPress={onPress}
    >
      <MaterialIcon size={20} icon="calendar_add_on" color="CurrentColor" />

      {intl.formatMessage({
        id: "common.addToCalendar",
        defaultMessage: "Add to calendar",
      })}
    </Button>
  )
}
