import {openModal} from 'sentry/actionCreators/modal';
import {Button, LinkButton} from 'sentry/components/button';
import {t} from 'sentry/locale';
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
import useApi from 'sentry/utils/useApi';
import useOrganization from 'sentry/utils/useOrganization';
import {sendUpgradeRequest} from 'getsentry/actionCreators/upsell';
import type {Subscription} from 'getsentry/types';
import OnDemandBudgetEditModal from 'getsentry/views/onDemandBudgets/onDemandBudgetEditModal';
interface UpgradeCTAProps {
hasBillingAccess: boolean;
}
export function CronsBannerUpgradeCTA({hasBillingAccess}: UpgradeCTAProps) {
const organization = useOrganization();
const api = useApi();
if (hasBillingAccess) {
return (
{t('Upgrade Now')}
);
}
return (
);
}
interface OnDemandCTAProps {
hasBillingAccess: boolean;
subscription: Subscription;
}
export function CronsBannerOnDemandCTA({
hasBillingAccess,
subscription,
}: OnDemandCTAProps) {
const organization = useOrganization();
const openOnDemandBudgetEditModal = () => {
openModal(
modalProps => (
),
{
closeEvents: 'escape-key',
}
);
};
// Only allow owners, billing roles to edit on demand spend
if (hasBillingAccess) {
return (
);
}
return null;
}