import type {
    ProjectConfig,
    HeaderSetting,
    MenuSetting,
    TransitionSetting,
    MultiTabsSetting,
  } from '#/config';
  import type { BeforeMiniState, ApiAddress } from '#/store';
  
  import { defineStore } from 'pinia';
  import { store } from '@/store';

  import { resetRouter } from '@/router';
  import { deepMerge } from '@/utils';
  
  interface FormFile {
    url:String;
    urlList:Array<String>;
  }

  export const userFormFileStore = defineStore({
    id: 'formfileurl',
    state: (): FormFile => ({
      url:"",
      urlList:[]
    }),
    getters: {
      getUrl(state): boolean {
        return state.url;
      },
      getUrlList(state):boolean{
        return state.urlList;
      }
    },
    actions: {
      setUrl(url:string): void {
        this.url = url;
      },
      setUrlList(urlList:Array):void{
        this.urlList = urlList;
      }
    },
    mutations:{
      setUrl(url:string): void {
        this.url = url;
      },
      setUrlList(urlList:Array):void{
        this.urlList = urlList;
      }
    }
  });
  
  // Need to be used outside the setup
  export function useAppStoreWithOut() {
    return userFormFileStore(store);
  }
  