{
  "mixins": [ "components/field/__QField", "mixins/file", "mixins/form" ],

  "meta": {
    "docsUrl": "https://v1.quasar.dev/vue-components/file"
  },

  "props": {
    "value": {
      "type": [ "File", "FileList", "Array" ],
      "desc": "Model of the component; Must be FileList or Array if using 'multiple' prop; Either use this property (along with a listener for 'input' event) OR use v-model directive",
      "required": true,
      "examples": [ "v-model=\"myModel\"" ],
      "category": "model"
    },

    "max-files": {
      "type": [ "Number", "String" ],
      "desc": "Maximum number of files to contain",
      "examples": [
        ":max-files=\"5\"",
        "10"
      ],
      "category": "behavior"
    },

    "display-value": {
      "type": [ "Number", "String" ],
      "desc": "Override default selection string, if not using 'file' or 'selected' scoped slots and if not using 'use-chips' prop",
      "examples": [ "Options: x, y, z" ],
      "category": "selection"
    },

    "use-chips": {
      "type": "Boolean",
      "desc": "Use QChip to show picked files",
      "category": "selection"
    },

    "counter-label": {
      "type": "Function",
      "desc": "Label for the counter; The 'counter' prop is necessary to enable this one",
      "params": {
        "props": {
          "type": "Object",
          "desc": "Object containing counter label information",
          "definition": {
            "totalSize": {
              "type": "String",
              "desc": "The total size of files in human readable format",
              "examples": [ "1.42 MB" ]
            },
            "filesNumber": {
              "type": "Number",
              "desc": "Number of picked files",
              "examples": [ 5 ]
            },
            "maxFiles": {
              "type": [ "Number", "String" ],
              "desc": "Maximum number of files (same as 'max-files' prop, if specified); When 'max-files' is not specified, this has 'void 0' as value",
              "examples": [ 5 ]
            }
          }
        }
      },
      "returns": {
        "type": "String",
        "desc": "String to display for the counter label",
        "__exemption": [ "examples" ]
      },
      "examples": [
        ":counter-label=\"counterLabelFn\""
      ],
      "category": "behavior"
    },

    "tabindex": {
      "extends": "tabindex"
    },

    "input-class": {
      "type": [ "Array", "String", "Object" ],
      "desc": "Class definitions to be attributed to the underlying selection container",
      "examples": [
        "my-special-class",
        ":input-class=\"{ 'my-special-class': <condition> }\""
      ],
      "category": "style"
    },

    "input-style": {
      "type": [ "Array", "String", "Object" ],
      "desc": "Style definitions to be attributed to the underlying selection container",
      "examples": [
        "background-color: #ff0000",
        ":input-style=\"{ backgroundColor: '#ff0000' }\""
      ],
      "category": "style"
    }
  },

  "scopedSlots": {
    "file": {
      "desc": "Override default node to render a file from the user picked list",
      "scope": {
        "index": {
          "type": "Number",
          "desc": "Selection index",
          "examples": [ 0 ]
        },

        "file": {
          "type": "File",
          "desc": "File object",
          "__exemption": [ "examples" ]
        },

        "ref": {
          "type": "Object",
          "desc": "Reference to the QFile component",
          "__exemption": [ "examples" ]
        }
      }
    },

    "selected": {
      "desc": "Override default selection slot; Suggestion: QChip",
      "scope": {
        "files": {
          "type": [ "FileList", "Array" ],
          "desc": "Array of File objects",
          "__exemption": [ "examples" ]
        },

        "ref": {
          "type": "Object",
          "desc": "Reference to the QFile component",
          "__exemption": [ "examples" ]
        }
      }
    }
  },

  "events": {
    "input": {
      "extends": "input"
    }
  },

  "methods": {
    "focus": {
      "desc": "Focus component"
    },

    "blur": {
      "desc": "Blur component (lose focus)"
    },

    "removeAtIndex": {
      "desc": "Remove file located at specific index in the model",
      "params": {
        "index": {
          "type": "Number",
          "desc": "Index at which to remove selection",
          "required": true,
          "examples": [ 0 ]
        }
      }
    },

    "removeFile": {
      "desc": "Remove specified file from the model",
      "params": {
        "file": {
          "type": "File",
          "desc": "File to remove (instance of File)",
          "required": true,
          "__exemption": [ "examples" ]
        }
      }
    }
  }
}
