import{a as l}from"./chunk-JD45QQDD.mjs";import{a as n,b as o,g as s}from"./chunk-IFUYCFBO.mjs";import"./chunk-76CZ6Z7T.mjs";var r=(a,t=!1)=>({name:a,important:t}),i=(a,t=0,e="test")=>({strategies:a,order:t,source:e});n("resolveStrategies",()=>{let a={isMatch:(t,e)=>e.some(c=>t.includes(c.replace("*","")))};o("resolves from exact path",()=>{let t={matcher:a,rules:{exact:{"foo.bar":[i([r("exactPath")])]},exactFields:{},patterns:{},default:[]}},e=l("foo.bar",t);s(e).toEqual(["exactPath"])}),o("resolves from exact field",()=>{let t={matcher:a,rules:{exact:{},exactFields:{bar:[i([r("exactField")])]},patterns:{},default:[]}},e=l("foo.bar",t);s(e).toEqual(["exactField"])}),o("resolves from pattern",()=>{let t={matcher:a,rules:{exact:{},exactFields:{},patterns:{"*.bar":[i([r("pattern")])]},default:[]}},e=l("foo.bar",t);s(e).toEqual(["pattern"])}),o("resolves from default",()=>{let t={matcher:a,rules:{exact:{},exactFields:{},patterns:{},default:[r("default")]}},e=l("foo.bar",t);s(e).toEqual(["default"])}),o("prioritizes important strategies",()=>{let t={matcher:a,rules:{exact:{"foo.bar":[i([r("normal"),r("important",!0)])]},exactFields:{},patterns:{},default:[]}},e=l("foo.bar",t);s(e).toEqual(["important","normal"])}),o("merges strategies from multiple sources",()=>{let t={matcher:a,rules:{exact:{"foo.bar":[i([r("exact")])]},exactFields:{bar:[i([r("field")])]},patterns:{"*.bar":[i([r("pattern")])]},default:[r("default")]}},e=l("foo.bar",t);s(e).toEqual(["exact","field","pattern","default"])})});
