import{SEVERITY_ERROR as t}from"./constants.mjs";import{emitDeprecationWarning as e}from"./utils/emitWarning.mjs";function r({results:r,maxWarnings:s,quietDeprecationWarnings:n,formatter:u,cwd:a}){let i=!1;for(const e of r)(e.errored||e.parseErrors.length>0||e.warnings.some(e=>e.severity===t))&&(i=!0,e.errored=!0);const d={cwd:a,errored:i,results:[],report:"",get output(){return n||this._outputWarned||(e("`output` is deprecated.","RESULT_OUTPUT_PROPERTY","Use `report` or `code` instead."),this._outputWarned=!0),this._output??""},reportedDisables:[],ruleMetadata:o(r)};if(Object.defineProperty(d,"_output",{value:"",writable:!0}),Object.defineProperty(d,"_outputWarned",{value:!1,writable:!0}),void 0!==s){const t=r.reduce((t,e)=>t+e.warnings.length,0);t>s&&(d.maxWarningsExceeded={maxWarnings:s,foundWarnings:t})}return d.report=u(r,d),d._output=d.report,d.results=r,d}function o(t){const[e]=t;return void 0===e||void 0===e._postcssResult?{}:e._postcssResult.stylelint.ruleMetadata}export{r as default};