CluPilotCloud/resources/views/components/ui/delivery.blade.php

27 lines
1.3 KiB
PHP

@props(['state' => 'scheduled'])
{{-- How soon this package can be handed over.
One component for both readers the public price sheet and the customer's
own overview — because the promise is the same promise, and a visitor who
reads "wird sofort ausgeliefert" before paying must not find a different
sentence on the page they land on afterwards. The state is derived from the
estate (HostCapacity::deliveryFor); nothing here decides anything.
No duration on the immediate branch on purpose: "in 20 Minuten" is a
promise about a machine we do not control. It is ready when it is ready,
and the customer is told by mail. The two to three working days on the
other branch is a promise about US — the time it takes to buy, rack and
onboard a server — and that one we can keep. --}}
@php
$immediate = $state === 'immediate';
@endphp
<p {{ $attributes->class(['flex items-center gap-2 text-xs font-medium']) }}>
<x-ui.icon :name="$immediate ? 'check' : 'calendar'"
@class(['size-4 shrink-0', 'text-success' => $immediate, 'text-muted' => ! $immediate]) />
<span @class(['text-success' => $immediate, 'text-muted' => ! $immediate])>
{{ __('delivery.'.($immediate ? 'immediate' : 'scheduled')) }}
</span>
</p>