# ivyforms/0.8.2/frontend/src/stores/proUpgradeDialogStore.ts

The Innovative Form Builder – IvyForms, version 0.8.2. 54 lines.

- Page: https://pluginprobe.com/plugins/ivyforms/0.8.2/code/frontend/src/stores/proUpgradeDialogStore.ts
- Raw: https://pluginprobe.com/plugins/ivyforms/0.8.2/raw/frontend/src/stores/proUpgradeDialogStore.ts
- Modified: 2026-02-12T13:48:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ivyforms/0.8.2/code/frontend/src/stores/proUpgradeDialogStore.ts#L10-L20`.

```typescript
/**
 * Pro Upgrade Dialog Store
 *
 * Centralized store for managing Pro feature upgrade dialogs
 */

import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { Ref } from 'vue'

type ButtonType = 'primary' | 'secondary' | 'tertiary'

export type ProUpgradeDialogData = {
  title: string
  subtitle?: string
  iconName?: string
  buttons?: {
    close?: {
      type?: ButtonType
      text: string
      function?: () => void
    }
    confirm?: {
      type?: ButtonType
      text: string
      function?: () => void
    }
  }
}

export const useProUpgradeDialogStore = defineStore('proUpgradeDialog', () => {
  const dialogVisible: Ref<boolean> = ref(false)
  const dialogData: Ref<ProUpgradeDialogData> = ref({
    title: '',
    subtitle: '',
  })

  const showDialog = (data: ProUpgradeDialogData) => {
    dialogData.value = data
    dialogVisible.value = true
  }

  const hideDialog = () => {
    dialogVisible.value = false
  }

  return {
    dialogVisible,
    dialogData,
    showDialog,
    hideDialog,
  }
})

```
