<?xml version="1.0" encoding="utf-8"?>
<configs>
  <!--
    Trader Discount - Clean the Shop :: dialogs.xml
    One option on the shared trader menu, gated to:
      - any of the 5 marked traders (tdcTraderNum >= 1)
      - after the trader intro (IntroComplete)
      - once per in-game day (custom TdcDaily requirement in our DLL)
    Selecting it opens the popup; the DLL handles success/fail, trader, gender,
    discount tier, cleaning, and after-effects.
  -->
  <insertBefore xpath="/dialogs/dialog[@id='trader']/statement[@id='start']/response_entry[@id='done']">
    <response_entry id="tdcAskDiscount" />
  </insertBefore>

  <append xpath="/dialogs/dialog[@id='trader']">
    <response id="tdcAskDiscount" text="tdcAskDiscount" nextstatementid="start">
      <requirement type="NPCHasCVarSDX, SCore" requirementtype="Hide" id="tdcTraderNum" operator="gte" value="1" />
      <requirement type="CheckCVar" requirementtype="Hide" id="IntroComplete" value="1" />
      <requirement type="TdcDaily, TraderDiscountClean" requirementtype="Hide" />
      <action type="TdcSetTrader, TraderDiscountClean" />
      <action type="OpenWindowSDX, SCore" id="TdcCleanGroup" />
    </response>
  </append>
</configs>
