{{-- A self-contained add-to-cart form. Posts the line via bbk-add-to-cart-controller (fetch) and hands the rendered cart body to the drawer over the `bbk-cart:changed` window event. Props: purchasable ProductVariant id. Omit to render no hidden id field — the host must then supply [data-bbk-purchasable-input] itself (e.g. a variant picker writing the selected id into it). quantity Integer for the hidden quantity field, or false to omit it (the host then puts its own name="quantity" control in the slot). The button and any quantity control come from the slot, so the host owns all appearance. Extra attributes (class, etc.) land on the
. --}} @props([ 'purchasable' => null, 'quantity' => 1, 'action' => null, ]) class('bbk-add-to-cart') }} > @csrf @if (! is_null($purchasable)) @endif @if ($quantity !== false) @endif {{ $slot }}