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

حساب و تنظیماتِ اپ

پیش‌نمایش تمام‌صفحه

پروفایلِ اپ: سربرگ با عکس و ویرایش، گروه‌های فهرستیِ ردیف‌کامل‌لمسی با فلش، سوییچِ اعلان و حالتِ شب، و خروج.

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

این بلاک از ۷ آیتم دیگ استفاده می‌کند: app-baravatarbuttoncontrol-sizeiconspersianswitch

پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add https://docs.digdesign.ir/r/app-bar.json https://docs.digdesign.ir/r/avatar.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/switch.json
pnpm dlx digdesign@latest add https://docs.digdesign.ir/r/app-bar.json https://docs.digdesign.ir/r/avatar.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/switch.json
yarn dlx digdesign@latest add https://docs.digdesign.ir/r/app-bar.json https://docs.digdesign.ir/r/avatar.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/switch.json
bunx --bun digdesign@latest add https://docs.digdesign.ir/r/app-bar.json https://docs.digdesign.ir/r/avatar.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/icons.json https://docs.digdesign.ir/r/persian.json https://docs.digdesign.ir/r/switch.json
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add app-bar avatar button control-size persian switch --framework vue
pnpm dlx digdesign@latest add app-bar avatar button control-size persian switch --framework vue
yarn dlx digdesign@latest add app-bar avatar button control-size persian switch --framework vue
bunx --bun digdesign@latest add app-bar avatar button control-size persian switch --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 app-bar avatar button control-size icons persian switch --framework angular
pnpm dlx digdesign@latest add app-bar avatar button control-size icons persian switch --framework angular
yarn dlx digdesign@latest add app-bar avatar button control-size icons persian switch --framework angular
bunx --bun digdesign@latest add app-bar avatar button control-size icons persian switch --framework angular
پکیج‌منیجر پیش‌فرض Node.jsنصب سریع با لینک سخت و دیسک مشترکYarn نسخهٔ ۲ به بالا (Berry)رانتایم و پکیج‌منیجر Bun
npx digdesign@latest add app-bar avatar button control-size persian switch --framework android
pnpm dlx digdesign@latest add app-bar avatar button control-size persian switch --framework android
yarn dlx digdesign@latest add app-bar avatar button control-size persian switch --framework android
bunx --bun digdesign@latest add app-bar avatar button control-size persian switch --framework android

۲. کد صفحه

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

mobile-profile.tsx
"use client"

import * as React from "react"

import { BellIcon, ChevronLeftIcon, CreditCardIcon, GuideIcon, LogoutIcon, MoonIcon, ShieldCheckIcon, TicketIcon, UserIcon } from "@/components/icons"
import { AppBar, AppBarTitle } from "@/components/ui/app-bar"
import { Avatar } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
import { ControlSizeProvider } from "@/components/ui/control-size"
import { Switch } from "@/components/ui/switch"
import { toFaDigits } from "@/lib/persian"
import { stockImages } from "@/lib/stock-images"

const GROUPS = [
  {
    title: "حساب",
    items: [
      { label: "اطلاعاتِ شخصی", icon: <UserIcon /> },
      { label: "کارت‌های بانکی", icon: <CreditCardIcon />, value: toFaDigits(2) },
      { label: "امنیت و ورود", icon: <ShieldCheckIcon /> },
    ],
  },
  {
    title: "پشتیبانی",
    items: [
      { label: "درخواست‌های من", icon: <TicketIcon /> },
      { label: "راهنما", icon: <GuideIcon /> },
    ],
  },
]

/**
 * پروفایل و تنظیماتِ اپ: سربرگ با عکس، نام و ویرایش؛ گروه‌های فهرستی ردیف‌کامل‌لمسی با
 * آیکون و فلش، سوییچ‌های اعلان و حالتِ شب در همان ردیف، و خروج جدا در پایین.
 */
export default function MobileProfileBlock() {
  const [notify, setNotify] = React.useState(true)
  const [dark, setDark] = React.useState(false)

  return (
    <ControlSizeProvider size="xl" asChild>
      <div className="mx-auto flex min-h-svh w-full max-w-md flex-col bg-subtle">
        <AppBar sticky className="bg-subtle">
          <AppBarTitle>حسابِ من</AppBarTitle>
        </AppBar>

        <main className="flex flex-1 flex-col gap-6 p-4">
          <section className="flex items-center gap-4 rounded-xl bg-card p-4">
            <Avatar size="lg" alt="مهسا کریمی" src={stockImages.personWoman1.src} className="size-16" />
            <div className="flex flex-1 flex-col">
              <span className="text-lg font-bold">مهسا کریمی</span>
              <bdi dir="ltr" className="text-start text-sm text-muted-foreground">
                {toFaDigits("0912 123 4567")}
              </bdi>
            </div>
            <Button variant="outline">ویرایش</Button>
          </section>

          {GROUPS.map((group) => (
            <section key={group.title} aria-labelledby={`group-${group.title}`} className="flex flex-col gap-2">
              <h2 id={`group-${group.title}`} className="px-2 text-sm font-medium text-muted-foreground">
                {group.title}
              </h2>
              <ul className="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
                {group.items.map((item) => (
                  <li key={item.label}>
                    <a href="#" className="flex min-h-14 items-center gap-3 px-4 hover:bg-muted">
                      <span aria-hidden className="text-muted-foreground [&>svg]:size-5">
                        {item.icon}
                      </span>
                      <span className="flex-1">{item.label}</span>
                      {item.value && <span className="text-sm text-muted-foreground">{item.value}</span>}
                      <ChevronLeftIcon aria-hidden className="size-5 text-muted-foreground ltr:rotate-180" />
                    </a>
                  </li>
                ))}
              </ul>
            </section>
          ))}

          <section aria-labelledby="group-settings" className="flex flex-col gap-2">
            <h2 id="group-settings" className="px-2 text-sm font-medium text-muted-foreground">
              تنظیمات
            </h2>
            <ul className="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
              <li className="flex min-h-14 items-center gap-3 px-4">
                <BellIcon aria-hidden className="size-5 text-muted-foreground" />
                <label htmlFor="notify" className="flex-1">
                  اعلان‌ها
                </label>
                <Switch id="notify" checked={notify} onCheckedChange={setNotify} />
              </li>
              <li className="flex min-h-14 items-center gap-3 px-4">
                <MoonIcon aria-hidden className="size-5 text-muted-foreground" />
                <label htmlFor="dark" className="flex-1">
                  حالتِ شب
                </label>
                <Switch id="dark" checked={dark} onCheckedChange={setDark} />
              </li>
            </ul>
          </section>

          <Button variant="outline" color="destructive" fullWidth className="mt-2 bg-card">
            <LogoutIcon />
            خروج از حساب
          </Button>
          <p className="text-center text-xs text-muted-foreground">نسخهٔ {toFaDigits("3.2.0")}</p>
        </main>
      </div>
    </ControlSizeProvider>
  )
}
mobile-profile.vue
<script setup lang="ts">
import { ref } from "vue"

import AppBar from "@/components/ui/AppBar.vue"
import AppBarTitle from "@/components/ui/AppBarTitle.vue"
import Avatar from "@/components/ui/Avatar.vue"
import Button from "@/components/ui/Button.vue"
import ControlSize from "@/components/ui/ControlSize.vue"
import Switch from "@/components/ui/Switch.vue"
import { DigIcon } from "@/lib/icons"
import { toFaDigits } from "@/lib/persian"

const personWoman1 = "https://docs.digdesign.ir/images/person-woman-1.webp"

const GROUPS = [
  {
    title: "حساب",
    items: [
      { label: "اطلاعاتِ شخصی", icon: "user", value: "" },
      { label: "کارت‌های بانکی", icon: "credit-card", value: toFaDigits(2) },
      { label: "امنیت و ورود", icon: "shield-check", value: "" },
    ],
  },
  {
    title: "پشتیبانی",
    items: [
      { label: "درخواست‌های من", icon: "ticket", value: "" },
      { label: "راهنما", icon: "guide", value: "" },
    ],
  },
]

/**
 * پروفایل و تنظیماتِ اپ: سربرگ با عکس، نام و ویرایش؛ گروه‌های فهرستی ردیف‌کامل‌لمسی با
 * آیکون و فلش، سوییچ‌های اعلان و حالتِ شب در همان ردیف، و خروج جدا در پایین.
 */
const notify = ref(true)
const dark = ref(false)
</script>

<template>
  <ControlSize size="xl" as-child>
    <div class="mx-auto flex min-h-svh w-full max-w-md flex-col bg-subtle">
      <AppBar sticky class="bg-subtle">
        <AppBarTitle>حسابِ من</AppBarTitle>
      </AppBar>

      <main class="flex flex-1 flex-col gap-6 p-4">
        <section class="flex items-center gap-4 rounded-xl bg-card p-4">
          <Avatar size="lg" alt="مهسا کریمی" :src="personWoman1" class="size-16" />
          <div class="flex flex-1 flex-col">
            <span class="text-lg font-bold">مهسا کریمی</span>
            <bdi dir="ltr" class="text-start text-sm text-muted-foreground">{{ toFaDigits("0912 123 4567") }}</bdi>
          </div>
          <Button variant="outline">ویرایش</Button>
        </section>

        <section v-for="group in GROUPS" :key="group.title" :aria-labelledby="`group-${group.title}`" class="flex flex-col gap-2">
          <h2 :id="`group-${group.title}`" class="px-2 text-sm font-medium text-muted-foreground">{{ group.title }}</h2>
          <ul class="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
            <li v-for="item in group.items" :key="item.label">
              <a href="#" class="flex min-h-14 items-center gap-3 px-4 hover:bg-muted">
                <span aria-hidden="true" class="text-muted-foreground [&>svg]:size-5">
                  <DigIcon :name="item.icon" />
                </span>
                <span class="flex-1">{{ item.label }}</span>
                <span v-if="item.value" class="text-sm text-muted-foreground">{{ item.value }}</span>
                <DigIcon name="chevron-left" aria-hidden="true" class="size-5 text-muted-foreground ltr:rotate-180" />
              </a>
            </li>
          </ul>
        </section>

        <section aria-labelledby="group-settings" class="flex flex-col gap-2">
          <h2 id="group-settings" class="px-2 text-sm font-medium text-muted-foreground">تنظیمات</h2>
          <ul class="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
            <li class="flex min-h-14 items-center gap-3 px-4">
              <DigIcon name="bell" aria-hidden="true" class="size-5 text-muted-foreground" />
              <label for="notify" class="flex-1">اعلان‌ها</label>
              <Switch id="notify" :checked="notify" @update:checked="notify = $event" />
            </li>
            <li class="flex min-h-14 items-center gap-3 px-4">
              <DigIcon name="moon" aria-hidden="true" class="size-5 text-muted-foreground" />
              <label for="dark" class="flex-1">حالتِ شب</label>
              <Switch id="dark" :checked="dark" @update:checked="dark = $event" />
            </li>
          </ul>
        </section>

        <Button variant="outline" color="destructive" full-width class="mt-2 bg-card">
          <DigIcon name="logout" />
          خروج از حساب
        </Button>
        <p class="text-center text-xs text-muted-foreground">نسخهٔ {{ toFaDigits("3.2.0") }}</p>
      </main>
    </div>
  </ControlSize>
</template>

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

این موارد هنوز برای Svelte آماده نیستند: app-baravatarcontrol-sizepersianswitchآیکون bellآیکون chevron-leftآیکون credit-cardآیکون guideآیکون logoutآیکون moonآیکون shield-checkآیکون ticketآیکون user

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

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

import { DigControlSize } from "@/components/ui/control-size"
import { DigAppBar, DigAppBarTitle } from "@/components/ui/app-bar"
import { DigAvatar } from "@/components/ui/avatar"
import { DigButton } from "@/components/ui/button"
import { DigIcon } from "@/lib/icons"
import { DigSwitch } from "@/components/ui/switch"
import { toFaDigits } from "@/lib/persian"

const personWoman1 = "https://docs.digdesign.ir/images/person-woman-1.webp"

const GROUPS = [
  {
    title: "حساب",
    items: [
      { label: "اطلاعاتِ شخصی", icon: "user" as const, value: "" },
      { label: "کارت‌های بانکی", icon: "credit-card" as const, value: toFaDigits(2) },
      { label: "امنیت و ورود", icon: "shield-check" as const, value: "" },
    ],
  },
  {
    title: "پشتیبانی",
    items: [
      { label: "درخواست‌های من", icon: "ticket" as const, value: "" },
      { label: "راهنما", icon: "guide" as const, value: "" },
    ],
  },
]

@Component({
  selector: "dig-block-mobile-profile",
  imports: [DigControlSize, DigAppBar, DigAppBarTitle, DigAvatar, DigButton, DigIcon, DigSwitch],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    <div digControlSize="xl" class="mx-auto flex min-h-svh w-full max-w-md flex-col bg-subtle">
      <header digAppBar sticky class="bg-subtle"><h1 digAppBarTitle>حسابِ من</h1></header>

      <main class="flex flex-1 flex-col gap-6 p-4">
        <section class="flex items-center gap-4 rounded-xl bg-card p-4">
          <span digAvatar size="lg" alt="مهسا کریمی" [src]="personWoman1" class="size-16"></span>
          <div class="flex flex-1 flex-col">
            <span class="text-lg font-bold">مهسا کریمی</span>
            <bdi dir="ltr" class="text-start text-sm text-muted-foreground">{{ toFaDigits("0912 123 4567") }}</bdi>
          </div>
          <button digButton type="button" variant="outline">ویرایش</button>
        </section>

        @for (group of GROUPS; track group.title) {
          <section [attr.aria-labelledby]="\`group-\${group.title}\`" class="flex flex-col gap-2">
            <h2 [id]="\`group-\${group.title}\`" class="px-2 text-sm font-medium text-muted-foreground">
              {{ group.title }}
            </h2>
            <ul class="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
              @for (item of group.items; track item.label) {
                <li>
                  <a href="#" class="flex min-h-14 items-center gap-3 px-4 hover:bg-muted"
                    ><span aria-hidden="true" class="text-muted-foreground [&>svg]:size-5"
                      ><svg [digIcon]="item.icon"></svg
                    ></span>
                    <span class="flex-1">{{ item.label }}</span>
                    @if (item.value) {
                      <span class="text-sm text-muted-foreground">{{ item.value }}</span>
                    }
                    <svg
                      digIcon="chevron-left"
                      aria-hidden="true"
                      class="size-5 text-muted-foreground ltr:rotate-180"
                    ></svg
                  ></a>
                </li>
              }
            </ul>
          </section>
        }

        <section aria-labelledby="group-settings" class="flex flex-col gap-2">
          <h2 id="group-settings" class="px-2 text-sm font-medium text-muted-foreground">تنظیمات</h2>
          <ul class="flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card">
            <li class="flex min-h-14 items-center gap-3 px-4">
              <svg digIcon="bell" aria-hidden="true" class="size-5 text-muted-foreground"></svg>
              <label for="notify" class="flex-1">اعلان‌ها</label>
              <button digSwitch id="notify" [checked]="notify()" (checkedChange)="notify.set($event)"></button>
            </li>
            <li class="flex min-h-14 items-center gap-3 px-4">
              <svg digIcon="moon" aria-hidden="true" class="size-5 text-muted-foreground"></svg>
              <label for="dark" class="flex-1">حالتِ شب</label>
              <button digSwitch id="dark" [checked]="dark()" (checkedChange)="dark.set($event)"></button>
            </li>
          </ul>
        </section>

        <button digButton type="button" variant="outline" color="destructive" fullWidth class="mt-2 bg-card">
          <svg digIcon="logout"></svg>
          خروج از حساب
        </button>
        <p class="text-center text-xs text-muted-foreground">نسخهٔ {{ toFaDigits("3.2.0") }}</p>
      </main>
    </div>
  `,
})
export class MobileProfileBlock {
  readonly toFaDigits = toFaDigits

  readonly GROUPS = GROUPS

  readonly personWoman1 = personWoman1

  readonly notify = signal(true)

  readonly dark = signal(false)
}
MobileProfileScreen.kt
package ir.digdesign.compose.demo.blocks

// sync: src/blocks/mobile-profile.tsx

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicText
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.semantics.heading
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import ir.digdesign.compose.Avatar
import ir.digdesign.compose.AvatarSize
import ir.digdesign.compose.Button
import ir.digdesign.compose.ButtonColor
import ir.digdesign.compose.ButtonVariant
import ir.digdesign.compose.ControlSize
import ir.digdesign.compose.ControlSizeProvider
import ir.digdesign.compose.DigAppBarVariant
import ir.digdesign.compose.DigIcons
import ir.digdesign.compose.DigRadius
import ir.digdesign.compose.DigSpacing
import ir.digdesign.compose.DigText
import ir.digdesign.compose.DigTheme
import ir.digdesign.compose.DigTopAppBar
import ir.digdesign.compose.IconTile
import ir.digdesign.compose.ListGroup
import ir.digdesign.compose.ListRow
import ir.digdesign.compose.Separator
import ir.digdesign.compose.Switch
import ir.digdesign.compose.TypographyLarge

private class ProfileItem(val label: String, val icon: ImageVector, val value: String? = null)
private class ProfileGroup(val title: String, val items: List<ProfileItem>)

private val ProfileGroups = listOf(
    ProfileGroup(
        "حساب",
        listOf(
            ProfileItem("اطلاعاتِ شخصی", DigIcons.User),
            ProfileItem("کارت‌های بانکی", DigIcons.CreditCard, "۲"),
            ProfileItem("امنیت و ورود", DigIcons.VerifiedUser),
        ),
    ),
    ProfileGroup(
        "پشتیبانی",
        listOf(
            ProfileItem("درخواست‌های من", DigIcons.Call),
            ProfileItem("راهنما", DigIcons.Info),
        ),
    ),
)

/** پروفایل و تنظیماتِ اپ: سربرگ با نام و ویرایش، گروه‌های فهرستیِ کاملاً لمسی، سوییچ‌های اعلان و حالتِ شب و خروج. */
@Composable
fun MobileProfileScreen() {
    var notify by remember { mutableStateOf(true) }
    var dark by remember { mutableStateOf(false) }
    val colors = DigTheme.colors

    Box(
        Modifier.fillMaxSize().background(colors.subtle).safeDrawingPadding(),
        contentAlignment = Alignment.TopCenter,
    ) {
        ControlSizeProvider(ControlSize.Xl) {
            Column(Modifier.widthIn(max = 480.dp).fillMaxWidth().fillMaxHeight()) {
                DigTopAppBar(title = "حسابِ من", windowInsets = WindowInsets(), variant = DigAppBarVariant.Transparent)
                Column(
                    Modifier.weight(1f).verticalScroll(rememberScrollState()).padding(DigSpacing * 4),
                    verticalArrangement = Arrangement.spacedBy(DigSpacing * 6),
                ) {
                    Row(
                        Modifier.fillMaxWidth().clip(RoundedCornerShape(DigRadius.xl)).background(colors.card).padding(DigSpacing * 4),
                        verticalAlignment = Alignment.CenterVertically,
                        horizontalArrangement = Arrangement.spacedBy(DigSpacing * 4),
                    ) {
                        Avatar(name = "مهسا کریمی", size = AvatarSize.Lg)
                        Column(Modifier.weight(1f)) {
                            TypographyLarge("مهسا کریمی")
                            Txt("۰۹۱۲ ۱۲۳ ۴۵۶۷")
                        }
                        Button("ویرایش", onClick = {}, variant = ButtonVariant.Outline)
                    }

                    ProfileGroups.forEach { group ->
                        Column(verticalArrangement = Arrangement.spacedBy(DigSpacing * 2)) {
                            Txt(group.title, Modifier.padding(horizontal = DigSpacing * 2).semantics { heading() }, weight = FontWeight.Medium)
                            ListGroup {
                                group.items.forEach { item ->
                                    ListRow(
                                        title = item.label,
                                        trailing = item.value,
                                        chevron = true,
                                        onClick = {},
                                        leading = { IconTile(item.icon) },
                                    )
                                }
                            }
                        }
                    }

                    Column(verticalArrangement = Arrangement.spacedBy(DigSpacing * 2)) {
                        Txt("تنظیمات", Modifier.padding(horizontal = DigSpacing * 2).semantics { heading() }, weight = FontWeight.Medium)
                        Column(Modifier.fillMaxWidth().clip(RoundedCornerShape(DigRadius.xl)).background(colors.card).padding(DigSpacing * 2)) {
                            Switch(checked = notify, onCheckedChange = { notify = it }, label = "اعلان‌ها", modifier = Modifier.fillMaxWidth().padding(DigSpacing * 2))
                            Separator()
                            Switch(checked = dark, onCheckedChange = { dark = it }, label = "حالتِ شب", modifier = Modifier.fillMaxWidth().padding(DigSpacing * 2))
                        }
                    }
                    Button("خروج از حساب", onClick = {}, variant = ButtonVariant.Outline, color = ButtonColor.Destructive, fullWidth = true)
                    Txt("نسخهٔ ۳.۲.۰", Modifier.fillMaxWidth(), size = DigText.xs, align = TextAlign.Center)
                }
            }
        }
    }
}

@Composable
private fun Txt(
    text: String,
    modifier: Modifier = Modifier,
    size: TextUnit = DigText.sm,
    color: Color = DigTheme.colors.mutedForeground,
    weight: FontWeight = FontWeight.Normal,
    align: TextAlign = TextAlign.Start,
    maxLines: Int = Int.MAX_VALUE,
) {
    BasicText(
        text,
        modifier,
        style = TextStyle(
            color = color,
            fontFamily = DigTheme.fontFamily,
            fontSize = size,
            fontWeight = weight,
            lineHeight = size * DigText.lineHeightBase,
            textAlign = align,
        ),
        maxLines = maxLines,
        overflow = TextOverflow.Ellipsis,
    )
}