بلاک‌ها · پشتیبانی و محتوا
ری‌اکت ۱۹ و Next.js با پیاده‌سازی دسترس‌پذیری داخلی دیگویو ۳ با Composition APISvelte ۵ با runesانگولار با signals و دایرکتیوهای standaloneجتپک کامپوز با KotliniOS — هنوز پورت نشده

ثبت تیکت با بخش، پیام، توضیح صوتی و پیوست، و فهرست تیکت‌های قبلی.

۱. نصب کامپوننت‌ها

این بلاک از ۱۳ آیتم دیگ استفاده می‌کند: badgebuttoncontrol-sizefile-uploadiconslabelpersianradio-cardradio-grouptext-fieldtextareatoastvoice-recorder

پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add https://docs.digdesign.ir/r/badge.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/file-upload.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/radio-card.json https://docs.digdesign.ir/r/radio-group.json https://docs.digdesign.ir/r/text-field.json https://docs.digdesign.ir/r/textarea.json https://docs.digdesign.ir/r/toast.json https://docs.digdesign.ir/r/voice-recorder.json
pnpm dlx digdesign@latest add https://docs.digdesign.ir/r/badge.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/file-upload.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/radio-card.json https://docs.digdesign.ir/r/radio-group.json https://docs.digdesign.ir/r/text-field.json https://docs.digdesign.ir/r/textarea.json https://docs.digdesign.ir/r/toast.json https://docs.digdesign.ir/r/voice-recorder.json
yarn dlx digdesign@latest add https://docs.digdesign.ir/r/badge.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/file-upload.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/radio-card.json https://docs.digdesign.ir/r/radio-group.json https://docs.digdesign.ir/r/text-field.json https://docs.digdesign.ir/r/textarea.json https://docs.digdesign.ir/r/toast.json https://docs.digdesign.ir/r/voice-recorder.json
bunx --bun digdesign@latest add https://docs.digdesign.ir/r/badge.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/file-upload.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/radio-card.json https://docs.digdesign.ir/r/radio-group.json https://docs.digdesign.ir/r/text-field.json https://docs.digdesign.ir/r/textarea.json https://docs.digdesign.ir/r/toast.json https://docs.digdesign.ir/r/voice-recorder.json
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework vue
pnpm dlx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework vue
yarn dlx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework vue
bunx --bun digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework vue
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add button --framework svelte
pnpm dlx digdesign@latest add button --framework svelte
yarn dlx digdesign@latest add button --framework svelte
bunx --bun digdesign@latest add button --framework svelte
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add badge button control-size file-upload icons input label persian radio-card radio-group text-field textarea toast voice-recorder --framework angular
pnpm dlx digdesign@latest add badge button control-size file-upload icons input label persian radio-card radio-group text-field textarea toast voice-recorder --framework angular
yarn dlx digdesign@latest add badge button control-size file-upload icons input label persian radio-card radio-group text-field textarea toast voice-recorder --framework angular
bunx --bun digdesign@latest add badge button control-size file-upload icons input label persian radio-card radio-group text-field textarea toast voice-recorder --framework angular
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework android
pnpm dlx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework android
yarn dlx digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework android
bunx --bun digdesign@latest add badge button control-size file-upload label persian radio-card radio-group text-field textarea toast voice-recorder --framework android

۲. کد صفحه

کد را در صفحهٔ پروژه‌تان بگذارید (React: app/<route>/page.tsx) و متن‌ها، داده و هندلرها را با محصول خودتان عوض کنید. با سوییچر فریم‌ورک کدِ همین صفحه در فریم‌ورک دیگر را ببینید.

support-ticket.tsx
"use client"

import * as React from "react"

import { ChevronLeftIcon, ClockIcon, CreditCardIcon, SettingsIcon, TruckIcon } from "@/components/icons"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { ControlSizeProvider } from "@/components/ui/control-size"
import { FileUpload } from "@/components/ui/file-upload"
import { Label } from "@/components/ui/label"
import { RadioCard } from "@/components/ui/radio-card"
import { RadioGroup } from "@/components/ui/radio-group"
import { TextField } from "@/components/ui/text-field"
import { Textarea } from "@/components/ui/textarea"
import { toast } from "@/components/ui/toast"
import { VoiceRecorder } from "@/components/ui/voice-recorder"
import { formatRelativeTime, toFaDigits } from "@/lib/persian"

type Status = "open" | "answered" | "closed"
const STATUS: Record<Status, { text: string; color: "warning" | "success" | "default" }> = {
  open: { text: "در انتظار پاسخ", color: "warning" },
  answered: { text: "پاسخ داده شد", color: "success" },
  closed: { text: "بسته", color: "default" },
}
const TICKETS: { id: string; subject: string; date: string; status: Status }[] = [
  { id: "5021", subject: "کسر وجه بدون ثبت سفارش", date: "2026-09-29T14:00:00", status: "answered" },
  { id: "5003", subject: "فاکتورِ رسمی برای شرکت", date: "2026-09-26T10:15:00", status: "open" },
  { id: "4988", subject: "تغییر آدرس تحویل", date: "2026-09-24T09:30:00", status: "closed" },
]
const DEPARTMENTS = [
  { value: "financial", label: "مالی و پرداخت", icon: <CreditCardIcon /> },
  { value: "orders", label: "سفارش و ارسال", icon: <TruckIcon /> },
  { value: "technical", label: "فنی", icon: <SettingsIcon /> },
]

/**
 * درخواستِ پشتیبانی: انتخابِ بخش با کارت‌های آیکون‌دار، موضوع و شرح، پیامِ صوتی و پیوست؛
 * ستونِ کنار زمانِ پاسخ و درخواست‌های قبلی را به‌صورتِ ردیف‌های قابلِ کلیک نشان می‌دهد.
 */
export default function SupportTicketBlock() {
  const [sending, setSending] = React.useState(false)
  const [department, setDepartment] = React.useState("financial")

  async function onSubmit(event: React.FormEvent<HTMLFormElement>) {
    event.preventDefault()
    setSending(true)
    await new Promise((resolve) => setTimeout(resolve, 800))
    setSending(false)
    toast.success("تیکت ثبت شد.", { description: "کد پیگیری ۵۰۲۲" })
  }

  return (
    <ControlSizeProvider size="xl" asChild>
      <main className="mx-auto grid grid-cols-1 w-full max-w-5xl items-start gap-8 p-4 sm:p-6 lg:grid-cols-[minmax(0,1fr)_20rem]">
        <form onSubmit={onSubmit} className="flex flex-col gap-8 rounded-xl border border-border bg-card p-6 sm:p-8">
          <div className="flex flex-col gap-1">
            <h1 className="text-2xl font-bold">درخواستِ پشتیبانی</h1>
            <p className="text-muted-foreground">هر چه دقیق‌تر بنویسید، سریع‌تر پاسخ می‌گیرید.</p>
          </div>

          <fieldset className="flex flex-col gap-3">
            <legend className="mb-3 text-sm font-medium">بخش</legend>
            <RadioGroup name="department" value={department} onValueChange={setDepartment} className="grid grid-cols-1 gap-3 sm:grid-cols-3">
              {DEPARTMENTS.map((item) => (
                <RadioCard key={item.value} value={item.value} media={item.icon} title={item.label} />
              ))}
            </RadioGroup>
          </fieldset>

          <div className="flex flex-col gap-5">
            <TextField label="موضوع" name="subject" required />
            <div className="flex flex-col gap-2">
              <Label htmlFor="message">شرحِ درخواست</Label>
              <Textarea id="message" name="message" rows={5} placeholder="چه اتفاقی افتاد و انتظار داشتید چه شود؟" required />
            </div>
            <div className="flex flex-col gap-2">
              <Label>توضیحِ صوتی</Label>
              <VoiceRecorder name="voice" maxDuration={60} />
            </div>
            <FileUpload name="attachments" multiple maxFiles={3} accept="image/*,.pdf" hint="تصویر یا PDF، حداکثر ۳ فایل" />
          </div>

          <div className="flex justify-end border-t border-border pt-8">
            <Button type="submit" loading={sending}>
              ثبتِ درخواست
            </Button>
          </div>
        </form>

        <aside className="flex flex-col gap-6">
          <div className="flex items-center gap-3 rounded-xl bg-subtle p-5">
            <span aria-hidden className="flex size-10 items-center justify-center rounded-lg bg-success-subtle text-success-subtle-foreground [&_svg]:size-5">
              <ClockIcon />
            </span>
            <div className="flex flex-col">
              <span className="font-semibold">پاسخ در کمتر از ۴ ساعت</span>
              <span className="text-sm text-muted-foreground">شنبه تا پنجشنبه، ۸ تا ۲۰</span>
            </div>
          </div>

          <section aria-labelledby="tickets-title" className="flex flex-col gap-3">
            <h2 id="tickets-title" className="font-semibold">
              درخواست‌های قبلی
            </h2>
            <ul className="flex flex-col gap-2">
              {TICKETS.map((ticket) => (
                <li key={ticket.id}>
                  <Button variant="outline" className="h-auto w-full justify-between gap-3 py-3 text-start font-normal">
                    <span className="flex flex-col items-start gap-1">
                      <span className="font-medium">{ticket.subject}</span>
                      <span className="text-xs text-muted-foreground">
                        #{toFaDigits(ticket.id)} · {formatRelativeTime(ticket.date)}
                      </span>
                      <Badge variant="soft" color={STATUS[ticket.status].color}>
                        {STATUS[ticket.status].text}
                      </Badge>
                    </span>
                    <ChevronLeftIcon aria-hidden />
                  </Button>
                </li>
              ))}
            </ul>
          </section>
        </aside>
      </main>
    </ControlSizeProvider>
  )
}
support-ticket.vue
<script setup lang="ts">
import { ref } from "vue"

import Badge from "@/components/ui/Badge.vue"
import Button from "@/components/ui/Button.vue"
import ControlSize from "@/components/ui/ControlSize.vue"
import FileUpload from "@/components/ui/FileUpload.vue"
import Label from "@/components/ui/Label.vue"
import RadioCard from "@/components/ui/RadioCard.vue"
import RadioGroup from "@/components/ui/RadioGroup.vue"
import TextField from "@/components/ui/TextField.vue"
import Textarea from "@/components/ui/Textarea.vue"
import { toast } from "@/components/ui/Toast.vue"
import VoiceRecorder from "@/components/ui/VoiceRecorder.vue"
import { DigIcon } from "@/lib/icons"
import { formatRelativeTime, toFaDigits } from "@/lib/persian"

type Status = "open" | "answered" | "closed"
const STATUS: Record<Status, { text: string; color: "warning" | "success" | "default" }> = {
  open: { text: "در انتظار پاسخ", color: "warning" },
  answered: { text: "پاسخ داده شد", color: "success" },
  closed: { text: "بسته", color: "default" },
}
const TICKETS: { id: string; subject: string; date: string; status: Status }[] = [
  { id: "5021", subject: "کسر وجه بدون ثبت سفارش", date: "2026-09-29T14:00:00", status: "answered" },
  { id: "5003", subject: "فاکتورِ رسمی برای شرکت", date: "2026-09-26T10:15:00", status: "open" },
  { id: "4988", subject: "تغییر آدرس تحویل", date: "2026-09-24T09:30:00", status: "closed" },
]
const DEPARTMENTS = [
  { value: "financial", label: "مالی و پرداخت", icon: "credit-card" },
  { value: "orders", label: "سفارش و ارسال", icon: "truck" },
  { value: "technical", label: "فنی", icon: "settings" },
]

/**
 * درخواستِ پشتیبانی: انتخابِ بخش با کارت‌های آیکون‌دار، موضوع و شرح، پیامِ صوتی و پیوست؛
 * ستونِ کنار زمانِ پاسخ و درخواست‌های قبلی را به‌صورتِ ردیف‌های قابلِ کلیک نشان می‌دهد.
 */
const sending = ref(false)
const department = ref("financial")

async function onSubmit() {
  sending.value = true
  await new Promise((resolve) => setTimeout(resolve, 800))
  sending.value = false
  toast.success("تیکت ثبت شد.", { description: "کد پیگیری ۵۰۲۲" })
}
</script>

<template>
  <ControlSize size="xl" as-child>
    <main class="mx-auto grid grid-cols-1 w-full max-w-5xl items-start gap-8 p-4 sm:p-6 lg:grid-cols-[minmax(0,1fr)_20rem]">
      <form class="flex flex-col gap-8 rounded-xl border border-border bg-card p-6 sm:p-8" @submit.prevent="onSubmit">
        <div class="flex flex-col gap-1">
          <h1 class="text-2xl font-bold">درخواستِ پشتیبانی</h1>
          <p class="text-muted-foreground">هر چه دقیق‌تر بنویسید، سریع‌تر پاسخ می‌گیرید.</p>
        </div>
        <fieldset class="flex flex-col gap-3">
          <legend class="mb-3 text-sm font-medium">بخش</legend>
          <RadioGroup name="department" :value="department" class="grid grid-cols-1 gap-3 sm:grid-cols-3" @update:value="(value) => (department = value)">
            <RadioCard v-for="item in DEPARTMENTS" :key="item.value" :value="item.value" :title="item.label">
              <template #media><DigIcon :name="item.icon" /></template>
            </RadioCard>
          </RadioGroup>
        </fieldset>
        <div class="flex flex-col gap-5">
          <TextField label="موضوع" name="subject" required />
          <div class="flex flex-col gap-2">
            <Label for="message">شرحِ درخواست</Label>
            <Textarea id="message" name="message" :rows="5" placeholder="چه اتفاقی افتاد و انتظار داشتید چه شود؟" required />
          </div>
          <div class="flex flex-col gap-2">
            <Label>توضیحِ صوتی</Label>
            <VoiceRecorder name="voice" :max-duration="60" />
          </div>
          <FileUpload name="attachments" multiple :max-files="3" accept="image/*,.pdf">
            <template #hint>تصویر یا PDF، حداکثر ۳ فایل</template>
          </FileUpload>
        </div>
        <div class="flex justify-end border-t border-border pt-8">
          <Button type="submit" :loading="sending">ثبتِ درخواست</Button>
        </div>
      </form>
      <aside class="flex flex-col gap-6">
        <div class="flex items-center gap-3 rounded-xl bg-subtle p-5">
          <span aria-hidden="true" class="flex size-10 items-center justify-center rounded-lg bg-success-subtle text-success-subtle-foreground [&_svg]:size-5">
            <DigIcon name="clock" />
          </span>
          <div class="flex flex-col">
            <span class="font-semibold">پاسخ در کمتر از ۴ ساعت</span>
            <span class="text-sm text-muted-foreground">شنبه تا پنجشنبه، ۸ تا ۲۰</span>
          </div>
        </div>
        <section aria-labelledby="tickets-title" class="flex flex-col gap-3">
          <h2 id="tickets-title" class="font-semibold">درخواست‌های قبلی</h2>
          <ul class="flex flex-col gap-2">
            <li v-for="ticket in TICKETS" :key="ticket.id">
              <Button variant="outline" class="h-auto w-full justify-between gap-3 py-3 text-start font-normal">
                <span class="flex flex-col items-start gap-1">
                  <span class="font-medium">{{ ticket.subject }}</span>
                  <span class="text-xs text-muted-foreground">#{{ toFaDigits(ticket.id) }} · {{ formatRelativeTime(ticket.date) }}</span>
                  <Badge variant="soft" :color="STATUS[ticket.status].color">{{ STATUS[ticket.status].text }}</Badge>
                </span>
                <DigIcon name="chevron-left" aria-hidden="true" />
              </Button>
            </li>
          </ul>
        </section>
      </aside>
    </main>
  </ControlSize>
</template>

کدِ این بلاک هنوز برای Svelte نوشته نشده است.

این موارد هنوز برای Svelte آماده نیستند: badgecontrol-sizefile-uploadlabelpersianradio-cardradio-grouptext-fieldtextareatoastvoice-recorderآیکون chevron-leftآیکون clockآیکون credit-cardآیکون settingsآیکون truck

کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="svelte" ایجنت آن را با کامپوننت‌های Svelte می‌سازد.

support-ticket.ts
import { Component, ChangeDetectionStrategy, signal } from "@angular/core"

import { DigControlSize } from "@/components/ui/control-size"
import { DigRadioGroup } from "@/components/ui/radio-group"
import { DigRadioCard, DigRadioCardMedia } from "@/components/ui/radio-card"
import { DigIcon } from "@/lib/icons"
import { DigTextField } from "@/components/ui/text-field"
import { DigInput, DigInputField } from "@/components/ui/input"
import { DigLabel } from "@/components/ui/label"
import { DigTextarea } from "@/components/ui/textarea"
import { DigVoiceRecorder } from "@/components/ui/voice-recorder"
import { DigFileUpload } from "@/components/ui/file-upload"
import { DigButton } from "@/components/ui/button"
import { DigBadge } from "@/components/ui/badge"
import { toast } from "@/components/ui/toast"
import { formatRelativeTime, toFaDigits } from "@/lib/persian"

type Status = "open" | "answered" | "closed"

const STATUS: Record<Status, { text: string; color: "warning" | "success" | "default" }> = {
  open: { text: "در انتظار پاسخ", color: "warning" },
  answered: { text: "پاسخ داده شد", color: "success" },
  closed: { text: "بسته", color: "default" },
}

const TICKETS: { id: string; subject: string; date: string; status: Status }[] = [
  { id: "5021", subject: "کسر وجه بدون ثبت سفارش", date: "2026-09-29T14:00:00", status: "answered" },
  { id: "5003", subject: "فاکتورِ رسمی برای شرکت", date: "2026-09-26T10:15:00", status: "open" },
  { id: "4988", subject: "تغییر آدرس تحویل", date: "2026-09-24T09:30:00", status: "closed" },
]

const DEPARTMENTS = [
  { value: "financial", label: "مالی و پرداخت", icon: "credit-card" as const },
  { value: "orders", label: "سفارش و ارسال", icon: "truck" as const },
  { value: "technical", label: "فنی", icon: "settings" as const },
] as const

@Component({
  selector: "dig-block-support-ticket",
  imports: [
    DigControlSize,
    DigRadioGroup,
    DigRadioCard,
    DigRadioCardMedia,
    DigIcon,
    DigTextField,
    DigInput,
    DigInputField,
    DigLabel,
    DigTextarea,
    DigVoiceRecorder,
    DigFileUpload,
    DigButton,
    DigBadge,
  ],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    <main
      digControlSize="xl"
      class="mx-auto grid grid-cols-1 w-full max-w-5xl items-start gap-8 p-4 sm:p-6 lg:grid-cols-[minmax(0,1fr)_20rem]"
    >
      <form
        class="flex flex-col gap-8 rounded-xl border border-border bg-card p-6 sm:p-8"
        (submit)="$event.preventDefault(); onSubmit()"
      >
        <div class="flex flex-col gap-1">
          <h1 class="text-2xl font-bold">درخواستِ پشتیبانی</h1>
          <p class="text-muted-foreground">هر چه دقیق‌تر بنویسید، سریع‌تر پاسخ می‌گیرید.</p>
        </div>
        <fieldset class="flex flex-col gap-3">
          <legend class="mb-3 text-sm font-medium">بخش</legend>
          <div
            digRadioGroup
            name="department"
            [value]="department()"
            class="grid grid-cols-1 gap-3 sm:grid-cols-3"
            (valueChange)="setDepartment($event)"
          >
            @for (item of DEPARTMENTS; track item.value) {
              <label digRadioCard [value]="item.value" [title]="item.label"
                ><span digRadioCardMedia><svg [digIcon]="item.icon"></svg></span
              ></label>
            }
          </div>
        </fieldset>
        <div class="flex flex-col gap-5">
          <div digTextField label="موضوع" required>
            <dig-input><input digInput name="subject" /></dig-input>
          </div>
          <div class="flex flex-col gap-2">
            <label digLabel for="message">شرحِ درخواست</label>
            <textarea
              digTextarea
              id="message"
              name="message"
              [rows]="5"
              placeholder="چه اتفاقی افتاد و انتظار داشتید چه شود؟"
              required
            ></textarea>
          </div>
          <div class="flex flex-col gap-2">
            <label digLabel>توضیحِ صوتی</label>
            <div digVoiceRecorder name="voice" [maxDuration]="60"></div>
          </div>
          <div
            digFileUpload
            name="attachments"
            multiple
            [maxFiles]="3"
            accept="image/*,.pdf"
            hint="تصویر یا PDF، حداکثر ۳ فایل"
          ></div>
        </div>
        <div class="flex justify-end border-t border-border pt-8">
          <button digButton type="submit" [loading]="sending()">ثبتِ درخواست</button>
        </div>
      </form>
      <aside class="flex flex-col gap-6">
        <div class="flex items-center gap-3 rounded-xl bg-subtle p-5">
          <span
            aria-hidden="true"
            class="flex size-10 items-center justify-center rounded-lg bg-success-subtle text-success-subtle-foreground [&_svg]:size-5"
            ><svg digIcon="clock"></svg
          ></span>
          <div class="flex flex-col">
            <span class="font-semibold">پاسخ در کمتر از ۴ ساعت</span>
            <span class="text-sm text-muted-foreground">شنبه تا پنجشنبه، ۸ تا ۲۰</span>
          </div>
        </div>
        <section aria-labelledby="tickets-title" class="flex flex-col gap-3">
          <h2 id="tickets-title" class="font-semibold">درخواست‌های قبلی</h2>
          <ul class="flex flex-col gap-2">
            @for (ticket of TICKETS; track ticket.id) {
              <li>
                <button
                  digButton
                  type="button"
                  variant="outline"
                  class="h-auto w-full justify-between gap-3 py-3 text-start font-normal"
                >
                  <span class="flex flex-col items-start gap-1"
                    ><span class="font-medium">{{ ticket.subject }}</span>
                    <span class="text-xs text-muted-foreground"
                      >#{{ toFaDigits(ticket.id) }} · {{ formatRelativeTime(ticket.date) }}</span
                    >
                    <span digBadge variant="soft" [color]="STATUS[ticket.status].color">{{
                      STATUS[ticket.status].text
                    }}</span></span
                  >
                  <svg digIcon="chevron-left" aria-hidden="true"></svg>
                </button>
              </li>
            }
          </ul>
        </section>
      </aside>
    </main>
  `,
})
export class SupportTicketBlock {
  readonly toFaDigits = toFaDigits

  readonly formatRelativeTime = formatRelativeTime

  readonly DEPARTMENTS = DEPARTMENTS

  readonly TICKETS = TICKETS

  readonly STATUS = STATUS

  readonly sending = signal(false)

  readonly department = signal("financial")

  async onSubmit() {
    this.sending.set(true)
    await new Promise((resolve) => setTimeout(resolve, 800))
    this.sending.set(false)
    toast.success("تیکت ثبت شد.", { description: "کد پیگیری ۵۰۲۲" })
  }

  setDepartment(value: string | string[] | undefined) {
    if (typeof value === "string") this.department.set(value)
  }
}

کدِ این بلاک هنوز برای Android نوشته نشده است.

همهٔ کامپوننت‌های لازم برای Android آماده‌اند؛ با MCP می‌توانید همین صفحه را از روی نسخهٔ React بسازید.

کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="android" ایجنت آن را با کامپوننت‌های Android می‌سازد.