import e from"node:path";const creator=()=>{const onceHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  index      : ${t.parent?.index(t)??"N/A"}`,r+=`\n  nodes      : ${t.nodes?.length}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")},documentHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  nodes      : ${t.nodes?.length}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")},atRuleHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  name       : ${t.name}`,r+=`\n  params     : ${t.params}`,r+=`\n  index      : ${t.parent?.index(t)??"N/A"}`,r+=`\n  nodes      : ${t.nodes?.length}`,r+=`\n  raw        : ${JSON.stringify(t.raws)}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")},ruleHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  selector   : ${t.selector}`,r+=`\n  index      : ${t.parent?.index(t)??"N/A"}`,r+=`\n  nodes      : ${t.nodes?.length}`,r+=`\n  raw        : ${JSON.stringify(t.raws)}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")},commentHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  text       : ${t.text}`,r+=`\n  index      : ${t.parent?.index(t)??"N/A"}`,r+=`\n  raw        : ${JSON.stringify(t.raws)}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")},declHandler=n=>t=>{let o=t.source?.input?.from;o&&(o=e.relative(process.cwd(),o));let r="";r+=n,r+=`\n  prop       : ${t.prop}`,r+=`\n  value      : ${t.value}`,r+=`\n  index      : ${t.parent?.index(t)??"N/A"}`,r+=`\n  raw        : ${JSON.stringify(t.raws)}`,r+=`\n  input.from : ${o??"N/A"}`,console.log(r+"\n")};return{postcssPlugin:"postcss-debug-logger",AtRule:atRuleHandler("AtRule"),AtRuleExit:atRuleHandler("AtRuleExit"),Comment:commentHandler("Comment"),CommentExit:commentHandler("CommentExit"),Declaration:declHandler("Declaration"),DeclarationExit:declHandler("DeclarationExit"),Document:documentHandler("Document"),DocumentExit:documentHandler("DocumentExit"),Once:onceHandler("Once"),OnceExit:onceHandler("OnceExit"),Root:onceHandler("Root"),RootExit:onceHandler("RootExit"),Rule:ruleHandler("Rule"),RuleExit:ruleHandler("RuleExit")}};creator.postcss=!0;export{creator as default,creator as"module.exports"};
