import { Form, Head, Link } from '@inertiajs/react'; import StoreController from '@/actions/App/Http/Controllers/StoreController'; import StoreSettingsController from '@/actions/App/Http/Controllers/StoreSettingsController'; import InputError from '@/components/input-error'; import StoreNav from '@/components/stores/store-nav'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { dashboard } from '@/routes'; import type { StoreSummary } from '@/types'; type Settings = { whatsapp_number: string | null; shipping_west: string; shipping_east: string; free_shipping_over: string | null; announcement_enabled: boolean; /** One message per line. */ announcement_messages: string; }; export default function StoreSettings({ store, settings, automaticAnnouncements, }: { store: StoreSummary; settings: Settings; automaticAnnouncements: string[]; }) { return ( <>

{store.name}

Back to store

{({ processing, errors }) => ( <> WhatsApp Shoppers see a WhatsApp chat button on every page of your store, and on their order page. Leave empty to hide it. Shipping fees Added at checkout, based on the shopper’s state.

Leave empty to always charge shipping. Enter 0 to always ship free.

Announcement bar A slim bar above your store's header. Several messages take turns.