A bargaining model in general equilibrium